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)