Jump to content

Echo specific rows number from a mysql database


tazeha

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...