Hello.
Help, plz, optimize the code. Here he is:
$result = mysql_query("SELECT * FROM `video_dating` ORDER BY id DESC",$db); while($myrow = mysql_fetch_array($result)){ $result_user = mysql_query("SELECT * FROM `go-users` WHERE id='".$myrow['author']."'",$db); $myrow_u = mysql_fetch_array($result_user); //параметры дальше выводятся } And I'm trying to make a complex query, but something does not work.
Here is what I write:
$result = mysql_query("SELECT `video_dating.author`,`go-users.id` FROM `video_dating` JOIN `go-users` ON `video_dating.author`=`go-users.id` ",$db); $myrow = mysql_fetch_array($result); As a result, he writes:
Database Error. MySQL writes: Unknown column 'video_dating.author' in 'field list'
Help, plz.
In general, how can you simplify the code of the above worker, the topmost one? I will be very grateful.