I need some help with PHP & Mysql. Can I use MySQL if-statement
instead of this. thanks.
if ($last_id > 0) {
$query = mysql_query("select * from chat where chat.to = '".$_SESSION['user_id']."' and id < '".$last_id."'");
}else{
$query = mysql_query("select * from chat where chat.to = '".$_SESSION['user_id']."' ");
}