By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

varcar for password,probelm with mixed alpha or numeric

P: n/a
I have a field called pword, whenever someone enters anything but numeric,
i.e. mixed alpha with numeric, or even just alpha.. the following error
appears.

Warning: mysql_numrows(): supplied argument is not a valid MySQL result
resource
What do I need to change the field to, to be able to have whatever password
configuration the user wants to enter?

TIA,

Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I figured it out.. put single quotes around my where statement in calling
this field and it now will accept alpha,
numeric or mixed. before I just had the $pword instead of '$pword'

I just thought I would share, I didn't think that would make a difference,
but it sure did.
"entoone" <en*****@pacbell.net> wrote in message
news:QP***************@newssvr23.news.prodigy.com. ..
I have a field called pword, whenever someone enters anything but numeric,
i.e. mixed alpha with numeric, or even just alpha.. the following error
appears.

Warning: mysql_numrows(): supplied argument is not a valid MySQL result
resource
What do I need to change the field to, to be able to have whatever password configuration the user wants to enter?

TIA,

Jul 16 '05 #2

P: n/a
On Fri, 08 Aug 2003 08:04:00 GMT, "entoone" <en*****@pacbell.net> wrote:
I have a field called pword, whenever someone enters anything but numeric,
i.e. mixed alpha with numeric, or even just alpha.. the following error
appears.

Warning: mysql_numrows(): supplied argument is not a valid MySQL result
resource


Never ignore the return value of mysql_query; if there's an error, it returns
false, and the reason for the error is available in mysql_error().

For debugging use something like:

$result = mysql_query($query)
or die ("Query failed:<br>$query<br>Error: " . mysql_error());

This will show you the error, which query caused it, and prevent your script
carrying on past a failed query and getting into even worse trouble with
undefined variables and resource handles (as above).

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.