im trying to select from 2 MySQL tables inorder to return a result. the current code for selecting from 1 table is:
$query = "SELECT upload_id, file_name, ROUND(file_size/1024) AS fs, description, DATE_FORMAT(upload_date, '%M %e, %Y') AS d FROM uploads ORDER BY upload_date DESC";
$result = mysql_query ($query);
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
so i tried defining a second query variable selecting the appropriate value from the other table and then concatenating the two variable queries using $result3 = $result . $result 2
and then placing $result 3 in the mysql_fetch_array statement but it returns saying that that is not a vaild MySQL return response.
How should i select from 2 different tables in one database?