Results 1 to 3 of 3

Thread: MySQL select statement isn't working.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Red face MySQL select statement isn't working.

    Anyone know what the heck I'm doing wrong here?

    Code:
    	// Create Query
    	$q = "SELECT * FROM rev_login WHERE username = '".$user."' and password = PASSWORD('".$password."') LIMIT 1"
    
    	// Run Query
    	$r = mysql_query($q);
    Never used the MySQL Password thingy so may be doing something wrong there.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: MySQL select statement isn't working.

    well it's only going to work if the PASSWORD function was used when inserting the records in the first place.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: MySQL select statement isn't working.

    Resolved this one by banging a ";" at the end of the $q = line OOPS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width