Re: What am I doing wrong here?
| From: | Lynn Siprelle | Date: | Tue, 26 Dec 2000 06:48:29 +0000 |
| Subject: | Re: What am I doing wrong here? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31827@lists.php.net to get a copy of this message | ||
>Try this and see what happens:
>
>$result = mysql_query("SELECT * FROM users WHERE first_name=$first_name AND
>last_name=$last_name") or die("Error on " . __LINE__ . " of " .
>__FILE__ .
>": " . mysql_error());
Thank you, this kind of debugging helps a great deal with newbies like me; this way I won't
have to ask quite as many stupid questions. It immediately told me the problem. As I suspected and
Cal suggested, it was a newbie-ish thing; I needed single quotes around the variables. I knew that,
for crying out loud! Nothing like learning a new language to make one humble. I also, feeling around
for what Kurth meant, changed the script and form so that they didn't use the same variable
names as the table's fields--is that what you meant, Kurth? I figured it couldn't hurt.
Anyway, it works now! Thank you, you've saved what hair I have left since I've been
tearing it out by the fistfuls over this. Programming as source of mental demangement. :)
Lynn
--
Lynn Siprelle, Siprelle & Associates: Web Construction and Publishing
Chief Assoc. Josephine b. 9/9/97 * New Assoc. Louisa due 5/1/01
Business: lynn@siprelle com | Personal: lynsa@siprelle.com
The New Homemaker: http://www.newhomemaker.com/