MySQL Forums
Forum List  »  PHP

Re: how to use PHP variable in MYSQL query?
Posted by: Thomas Rye
Date: January 23, 2008 10:22AM

I tried your test query line and it returned fine...

Upon looking into what could be causing these problems when everything seems like it should be in order AND practically the same code is working fine on another page I discovered my problem...

When checking if fields were blank I had mistakenly used "=" instead of "==", so my username value was being overwritten before it got to it's place of usefulness.

Explains everything for me.

Sidenote: A later issue I found was that I had added an 's' to one of my table names and it was causing an error (of course).

Lesson to be learned: Scour your code for proper operators ("=" and "==" etc) and spelling variances/mistakes.

Thanks for offering assistance Peter.

Options: ReplyQuote


Subject
Written By
Posted
Re: how to use PHP variable in MYSQL query?
January 23, 2008 10:22AM


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.