<?php
$query_online = mysql_query("SELECT count(*) as count FROM user u, user_online uo WHERE u.user_id LIKE '$row2[user_id]' AND uo.access_id=u.user_id ORDER BY uo.access_id ASC") or die("SQL Command online error");
$row_online = mysql_fetch_assoc($query_online);
$online = $row_online['count'];
?>
<td align="center"><?php if($online==0){echo "<img src=../Images/msn-offline-10.png width=20 height=20 alt='ออฟไลน์'>";}else {echo "<img src=../Images/msn-online-10.png width=20 height=20 alt='ออนไลน์'>";} ?>
</td>
$query_online = mysql_query("SELECT count(*) as count FROM user u, user_online uo WHERE u.user_id LIKE '$row2[user_id]' AND uo.access_id=u.user_id ORDER BY uo.access_id ASC") or die("SQL Command online error");
โค้ดในนี้เปลี่ยนยังงัยดีอ่ะครับมันเยอะจัง
user u, คืออะไรอ่ะครับ
1
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\test\regis.php on line 51
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\test\regis.php on line 51
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test\regis.php on line 52
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\test\regis.php on line 51
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\test\regis.php on line 51
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test\regis.php on line 52