#1
  1. No Profile Picture
    ErikMathy
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi!

    I was wondering if anyone might know the proper mysql syntax for a problem I am hitting.

    I am playing around with setting up user authentication for a site using mysql as the backend and PHP up front. I don't want to create 50-1000 new records in the user and db tables for various and sundry reasons. I'd rather have a table (fooClients) within the site specific database (fooBase) already built.

    Within fooClients there is an ID and a Login (read: password) field. While it would be very easy to have the Login as a varchar (15) field I'd prefer to use the password encyption. That's where the snag hits.

    Select * From fooClient Where Login = 'foo'
    doesn't work, because it's not passing 'foo' to mysql in it's encrypted form.

    Select * From fooClient Where Login = password('foo') doesn't fly either.

    Any ideas?

    Mucho thanks in advance!
    - Erik
  2. #2
  3. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    Are you sure it was stored using the mysql password() encryption and not something else?
  4. #3
  5. No Profile Picture
    ErikMathy
    Guest
    Devshed Newbie (0 - 499 posts)
    Hey hey!

    Positive. I've done it both manually and via phpMyAdmin and made sure the password encryption is set on my test users.

    Why?
    - Erik
  6. #4
  7. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    OK, for some reason I thought you were using an existing table (not one you developed). Many people don't use mysql's password encryption but encode in the script using md5 for example.

Similar Threads

  1. Retrieving data for storefront problems
    By moditup in forum MySQL Help
    Replies: 4
    Last Post: January 27th, 2005, 01:18 PM
  2. radio buttons, retrieving data
    By tanmy_1999 in forum PHP Development
    Replies: 1
    Last Post: July 11th, 2003, 04:53 PM
  3. Filling & retrieving data from website with VB
    By thenelson in forum Database Management
    Replies: 2
    Last Post: July 10th, 2003, 12:37 AM
  4. Trouble retrieving data from multiple tables
    By Sheryll in forum MySQL Help
    Replies: 3
    Last Post: July 30th, 2002, 04:44 PM
  5. storing encrypted data in cookies
    By Tantalus in forum PHP Development
    Replies: 7
    Last Post: January 20th, 2002, 11:42 PM

IMN logo majestic logo threadwatch logo seochat tools logo