MySQL Forums
Forum List  »  Newbie

Re: what's wrong with this SELECT statement?
Posted by: cadex
Date: June 27, 2005 11:37PM

Yeah, that was the first thing I tried. It likes that one even less. If I put double quotes on the inside I get a 1064 SQL Syntax error. I've even tried taking out one set of quotes. First the doubles, then the singles, but that doesn't work either.

I've actually never understood why I needed two sets of quotes or even the period for concatenation. To me it seems like just a set of quotes should be enough like this:
...AND "$_GET['select_store']" = nis_completion.store_id";

I've also tried putting that variable last (shown below) because I thought the 2 double quotes at the end confused SQL or PHP. I know those are there because at the begining of the line I opened up the double quote which you see in the first post.
AND nis_completion.store_id = "' . $_GET['select_store'] . '"";

Thanks
Kyle

PS: this is my first time checking out these forums and I think it's pretty amazing that authors of books are helping people out. Lately every time I've had a problem I've run out to get another book. Thanks to those who wrote MySQL in a Nutshel, PHP and MySQL for Dynamic Web Sites, PHP & MySQL for Dummies, the Wrox books, and Sams PHP in 10 minutes. I've learned a lot so far.

Options: ReplyQuote


Subject
Written By
Posted
Re: what's wrong with this SELECT statement?
June 27, 2005 11:37PM


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.