tazeha Posted March 4, 2015 Share Posted March 4, 2015 Hello In mysql is 50 row, example: id = 1,2,3,4,5,... I want echo only row 5 until 20 how can I? my code foreach ( $result as $row ) { $data .='<tr>'; $data .= '<td>'.$row->Shakhes.'</td>'; $data .='<td>'.$row ->Value.'</td>'; $data .='<td>'.$row ->TopValue.'</td>'; $data .= '<td>'.$row->DownValue.'</td>'; $data .= '<td>'.$row->Difference.'</td>'; $data .='</tr>'.PHP_EOL; } Link to comment Share on other sites More sharing options...
thescientist Posted March 4, 2015 Share Posted March 4, 2015 You could do it in the query using LIMIT http://stackoverflow.com/questions/1252673/how-can-i-select-rows-in-mysql-starting-at-a-given-row-number 1 Link to comment Share on other sites More sharing options...
tazeha Posted March 5, 2015 Author Share Posted March 5, 2015 Great thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now