$data = dbarray(dbquery("SELECT ".TM."*, user_id,user_name,user_avatar FROM ".TM."messages tmLEFT JOIN ".TM."users tu ON tm.message_from=tu.user_id WHERE message_to='".$userdata['user_id']."' && message_read=0 ORDER BY message_datestamp DESC LIMIT 1"));