Home MySQL Limit 2 How to select second row
Reply: 0

MySQL Limit 2 How to select second row

user560
1#
user560 Published in April 20, 2018, 6:03 pm
$sMonOperationHours = "SELECT * FROM ".COMPANY_OPERATION_HOURS_TBL." WHERE 
f_company_id = '$g_companyid' AND f_day = 'MON' LIMIT 2";
$rsMonOperationHours = mysql_query($sMonOperationHours);
$rowMonOperationHours = mysql_fetch_array($rsMonOperationHours);
$iMonStartTime = $rowMonOperationHours['f_start_time'];
$iMonStartTime2 = ???;
$iMonEndTime = $rowMonOperationHours['f_end_time'];
$iMonEndTime2 = ???;

After limiting my SQL query result to 2, how do I select the f_start_time and f_end_time for the second row?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.385514 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO