select from 2 tables and use mail ( )

wxdqz

New Member
hello all
I've been stumped for a couple days on something that just doesn't make sense.
I want to pull a password , user name, and email address out of 2 tables, and mail the password to the user.
this is my sql statement
(user is ambigous)

$sql = "select post.user, post.email, password from post, user_table where post.user_id = user_table.user_id and
post.user = '$post.user'";

This method doesn't work!

Now if I type this in the phpMyAdmin everything is fine, but as soon as i intergrate with PHP , it craps out.
I entered a new field in the user_table for password and inserted email address, and did a select *, to check the mail ( ) and everything was cool, so i really don't know what's going on.
Has any one experienced this at all.
I could always do a insert email into the user_table, but that would confuse all my other scripts.
Thanks
 
Back
Top