MySQL Forums
Forum List  »  PHP

Select Where problem
Posted by: Mike Hayes
Date: November 21, 2015 02:28PM

$result = mysqli_query($con, 'SELECT * FROM books WHERE title = $title');
gives the following error.
Unknown column '$title' in 'where clause'
Printing $title before and after the SELECT shows it contains the correct and expected search argument. What am I missing?

This statement has worked!!

Thanks. Mike

Options: ReplyQuote


Subject
Written By
Posted
Select Where problem
November 21, 2015 02:28PM
November 21, 2015 04:11PM
November 23, 2015 03:41PM
November 23, 2015 04:47PM
November 24, 2015 07:38AM
November 22, 2015 11:20PM
November 23, 2015 09:51AM


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.