![]() |
| ||
| mysql_fetch_array for multiple tables I need to get information from 2 tables in the same mysql database $sql = mysql_query("SELECT * FROM notes, customers WHERE `to`='next' LIMIT 5");
The name and ebay fields are in the customer table and the rest are in the notes table. The code above doesnt produce any error just no rows are displayed |
| ||
| Re: mysql_fetch_array for multiple tables you cant query two tables aat once. Either do them one at a time or make a stored procedure. I don't know anything about mysql so I cant help with the stored procedure. |
| ||
| Re: mysql_fetch_array for multiple tables is the talbes realted to each othere and the primary key of one table should be the foreign of the other tbale that u are trying to get datafrom if soo then you can use join select from note, coustomers where note.id =costomer.id and to = 'next'; u can get more information on this from http://www.tizag.com/mysqlTutorial/mysqljoins.php |
| All times are GMT -4. The time now is 11:52 pm. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC