MySQL Forums
Forum List  »  PHP

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

Written By
Re: Syntax Error - Syntax for 'LIMIT 1'
April 10, 2012 03:16PM

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.