A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Easy? MySQL / PHP query writing question...

  1. #1
    Senior Member
    Join Date
    Jun 2006
    Location
    Charlotte, NC
    Posts
    120

    Easy? MySQL / PHP query writing question...

    Greetings all...
    i'm trying to write a query in PHP for my MySQL database...

    what i'm trying to do is pull customer_name from the customers table, and user_name from the users table, and they are linked by customer_id...
    and then comparing to variables i'm loading in. I can get it to work if i use just the users table and do customer_id, but i really want to do customer_name (which is only in the customers table)...

    i used to be good at SQL, but can't figure out how to do it through PHP...

    this is the code i've got:
    PHP Code:
    $query "SELECT * FROM users, customers WHERE users.customer_id = customers.customer_id AND customer_name = '$custID' AND user_login = '$username'"
    what am i doing wrong?

    tia!

  2. #2

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

HTML5 Development Center