Skip navigation links

MySQL Forums :: PHP :: Syntax Error - Syntax for 'LIMIT 1'


Advanced Search

Re: Syntax Error - Syntax for 'LIMIT 1'
Posted by: Mohammed Alkahlani ()
Date: April 10, 2012 03:16PM

try this query:

$query = "SELECT * FROM subjects WHERE id=$subject_id";

I'm a assuming that $subject_id is a unique value. Therefore, there's no need to set a limit. And because IDs are numeric, I didn't use ''.

Options: ReplyQuote


Subject Written By Posted
Syntax Error - Syntax for 'LIMIT 1' Doug Johnson 04/09/2012 10:18AM
Re: Syntax Error - Syntax for 'LIMIT 1' Mohammed Alkahlani 04/10/2012 03:16PM
Re: Syntax Error - Syntax for 'LIMIT 1' VR Comrie 07/04/2012 11:49PM
Re: Syntax Error - Syntax for 'LIMIT 1' Jose Mayorquin 07/23/2012 06:25PM
Re: Syntax Error - Syntax for 'LIMIT 1' Rick James 07/25/2012 09:47AM
Re: Syntax Error - Syntax for 'LIMIT 1' Aurelien Marchand 04/11/2012 07:55AM
Re: Syntax Error - Syntax for 'LIMIT 1' irving gallardos 07/26/2012 12:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.