jwk811 Posted February 22, 2010 Share Posted February 22, 2010 $sql = "SELECT message_id, user_name, message, date_format(post_time, '%h:%i') as post_time" . " FROM message WHERE chat_id = " . db_input($_GET['chat']) . " AND message_id > " . $last; whereever i put in LIMIT 10 is doesnt work??? Link to comment https://forums.phpfreaks.com/topic/192889-limit-in-mysql/ Share on other sites More sharing options...
jwk811 Posted February 22, 2010 Author Share Posted February 22, 2010 needed a space before the " LIMIT 10" at the end. nvm Link to comment https://forums.phpfreaks.com/topic/192889-limit-in-mysql/#findComment-1015933 Share on other sites More sharing options...
salih0vicX Posted February 22, 2010 Share Posted February 22, 2010 $sql = 'SELECT message_id, user_name, message, date_format(post_time, "%h:%i") as post_time ' . 'FROM message WHERE chat_id = ' . db_input($_GET['chat']) . ' AND message_id > ' . $last .' LIMIT 10' Link to comment https://forums.phpfreaks.com/topic/192889-limit-in-mysql/#findComment-1015937 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.