hi.
this is a php question, and is offtopic for this list...
...but values in single quotes are sent without parsing to mysql from php.
use " double quotes " instead.

-ravi.

-----Original Message-----
From: Grosen Friis [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 29, 2001 1:07 PM
To: 'Scott Spearman'; '[EMAIL PROTECTED]'
Subject: RE: Novice mySQL and PHP problem


> -----Original Message-----
> From: Scott Spearman [mailto:[EMAIL PROTECTED]]
> Sent: 29. maj 2001 18:50
> To: [EMAIL PROTECTED]
> Subject: Novice mySQL and PHP problem
>
>
> When I do my query:
> mysql_query(SELECT * FROM users WHERE name='$sentname');
> it always returns 0 elements.  $sentname is comming from form
> input on a
>
> page that POST's to my current page.  I have checked this value and it
> is what I expect, usually Scott for testing purposes.  The
> first record
> in the table has name Scott, and I return that element if I
> replace the
> $sentname in the query with Scott.  I'm fairly certain that this is a
> simple string management problem and has an easy fix, but I'm at wits
> end with this.
> Thanks for your time,
> Scott Spearman
> [EMAIL PROTECTED]

Hi Scott

Have you tried to print out and verify the syntax of your SQL query:

echo "SELECT * FROM users WHERE name='$sentname'";

What is being printed out?
--
Regards

Grosen Friis,
Programmer
--------------------------------------
The Stibo Group
Søren Nymarks Vej 3
DK-8270 Højbjerg
Aarhus, Denmark

Phone +45 89 39 11 11
Direct +45 89 39 13 21
Fax +45 89 39 11 12
E-mail: [EMAIL PROTECTED]

http://www.stibo.com
--------------------------------------

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to