varcar for password,probelm with mixed alpha or numeric

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • entoone

    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,



  • entoone

    #2
    Re: varcar for password,probel m with mixed alpha or numeric

    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" <entoone@pacbel l.net> wrote in message
    news:QPIYa.876$ Au4.452@newssvr 23.news.prodigy .com...[color=blue]
    > 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[/color]
    password[color=blue]
    > configuration the user wants to enter?
    >
    > TIA,
    >
    >
    >[/color]


    Comment

    • Andy Hassall

      #3
      Re: varcar for password,probel m with mixed alpha or numeric

      On Fri, 08 Aug 2003 08:04:00 GMT, "entoone" <entoone@pacbel l.net> wrote:
      [color=blue]
      >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[/color]

      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($qu ery)
      or die ("Query failed:<br>$que ry<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 (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
      Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

      Comment

      Working...