How can I choose the first 5 results and then add another option?
The current code is below:
& lt ;? Php $ query = "SELECT * by message where u_id = '$ uid' ORDER ID id"; $ Result = mysql_query ($ query); $ Num = mysql_numrows ($ Result); Mysql_close (); Echo ""; $ I = =; While ($ i & lt; $ num) {$ other = mysql_result ($ result, $ i, "sender_full_name"); $ Sysid = mysql_result ($ result, $ i, "SENDER_ID"); $ Date of birth = mysql_result ($ result, $ i, "birth date"); // If the $ date date is empty (empty ($ date of birth)) {$ date of birth = "new message - $ manitis & lt; / a & Gt; & lt; br & gt; & lt; div id = dobpres & gt; $ date of birth & lt; / div & gt; & lt; / div & gt; "; Echo ""; $ I ++; }? & Gt; You can try to select 6 rows for the first time and show if you get 6 records. With the "Show more options" message from the first 5 "Select" where u_id = '$ uid' ORDER id DESC LIMIT 0, 6 "; for later time You should have your query in this way:
"SELECT * from a message where u_id = '$ uid' ORDER id desac LIMIT 6, 5"; "SELECT * messages where u_id = '$ Uid 'ORDER id DESC limit 11, 5 ";" SELECT * by messages where u_id =' $ uid 'ORDER id DESC LIMIT 16, 5 "... ... and Every time "Show more options" if you are able to get the required number of records I am.
Comments
Post a Comment