$data = dbarray(dbquery("SELECT ".DB_PREFIX."*, user_id,user_name,user_avatar FROM ".DB_PREFIX."messages tmLEFT JOIN ".DB_PREFIX."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"));