Ok ... I have a table named " users " which i am connected too. $fetch=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$username'")); I have a table named " crews " which i need to get data from. What code i use to get be connected to both database table on one page? Daz.
Daz, You could do something like: $fetch=mysql_fetch_object(mysql_query("SELECT user.*, crew.* FROM users, crew WHERE users.username='$username' AND crew.name = '$crew_name'")); PHP: You can get specific based on that as well... example do something like $fetch=mysql_fetch_object(mysql_query("SELECT users.username, crew.name...
if users and crew are part of the same database (meaning under the same user and pass for your database connection) then what I showed you will work. If it isn't then you either need to move the crews table in with the users and use what i gave you or you need to setup a new connection to access the crews table within the other database.
not work becuase .. table = " users " not " user " table 2 = " crews " not " crew " I cant change the code becuase i dont no which needs changing?
This forum is for helping you, but ultimately we all want you to learn stuff, and not do your work for you. Why don't you look into MySQL a little?