472,146 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

varcar for password,probelm with mixed alpha or numeric

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
2 2286
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
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.

Similar topics

4 posts views Thread by Bryan Harrington | last post: by
3 posts views Thread by success_ny | last post: by
5 posts views Thread by Bosconian | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.