On Saturday 03 November 2001 17:29, Martin wrote:
Why am I not getting anything returned from this function?
I have code doing a if user exists and b if user doesn't
exist. I'm not getting any numRows result apparently. The
query is OK and returns 1 user for $name=admin. I'm not
getting any
Why am I not getting anything returned from this function?
I have code doing a if user exists and b if user doesn't exist. I'm not
getting any numRows result apparently. The query is OK and returns 1 user
for $name=admin. I'm not getting any errors from isError.
Martin
function exists($name)
- Original Message -
From: Martin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 04, 2001 8:29 AM
Subject: [PHP-DB] Nothing returned
: Why am I not getting anything returned from this function?
: I have code doing a if user exists and b if user doesn't exist. I'm
$sql = SELECT * FROM users WHERE (name='$name')
if you are not getting an error, it is usually worth echoing the query SQL
echo $sql ;
and perhaps trying it manually.
Is it possible the quotes around the $name are giving
SELECT * FROM users WHERE (name='$name')
and not evaluating $name
Peter Lovatt wrote:
$sql = SELECT * FROM users WHERE (name='$name')
if you are not getting an error, it is usually worth echoing the query SQL
echo $sql ;
and perhaps trying it manually.
Is it possible the quotes around the $name are giving
SELECT * FROM users WHERE