I'm here to complete the language trouble please MySQL teacher
$gettimeline = mysql_query("SELECT * FROM `timeline`LEFT JOIN `users_profile` USING (id)ORDER BY `addtime_timeline` DESC");
The above is to find timeline list and arrange it in Addtime_timeline
while ($row=mysql_fetch_array($gettimeline)){ 印出timeline的欄位資料}
The above is the cycle of printing out timeline information
In the loop I'll add the following query
while ($row =mysql_fetch_array ($gettimeline)) {$GETthumb 1 = mysql_query ( "SELECT * from ' timeline_thumb ' WHERE ' id ' = '". $_session[' userid ']. "' and ' by_timeline_id ' = ' ". $row [' timeline_id ']." ' and ' thumb_type ' = ' 1 '); $pub _getthumb1 = mysql_query ("select * from ' timeline_thumb ' WHERE ' by_timeline_id ' = '". $row [' Ti meline_id ']. "' and ' thumb_type ' = ' 1 ' "); $pub _getinfo = mysql_query (" select * from ' timeline_thumb ' JOIN ' Users_profile ' USING (ID) WHERE ' by_timeline_id ' = ' ". $row [' timeline_id ']." ' ORDER by ' addtime_thumb ' DESC); $get _comment = mysql_query ("select * from ' timeline_comment ' JOIN ' users_profile ' USING (i d) WHERE ' re_timeline_id ' = ' ". $row [' timeline_id ']." ' ORDER by ' addtime_comment ' DESC); $get _comment_num = mysql_query ("select * from ' timeline_comment ' WHERE ' re_timeline_id ' = '. $row [' timeline_id ']. "'");}
GETTHUMB1 is a few strokes of the ID (by_timeline_id) that matches the timeline (timeline_id) in the Timeline_thumb information table (a few strokes of the user's own pen).
The PUB_GETTHUMB1 is a total of a few pens.
Pub_getinfo is to capture the user's information and users_profile (ID) response.
Get_comment is the ID (re_timeline_id) that catches the timeline (timeline_id) in the Timeline_comment information table and grabs the user's information and users_profile (ID).
Get_comment_num is grasping out a total of a few pens.
Is there a space for you to simplify MySQL? ........