Jump to content

[SOLVED] Loop


Zepo.

Recommended Posts

Wow i got completely lost.

Can you please write an example that follows this

SELECT * FROM `mybb_offers` WHERE `cat` ='".$cat."' AND `MID` = 'no'  ORDER BY `".$orderby."` ".$order." LIMIT $page,10

But where it doesn't pull if ID exists in table offerscompleted in the ID column .

Link to comment
https://forums.phpfreaks.com/topic/116536-solved-loop/#findComment-599767
Share on other sites

$sql = "SELECT a.* 
          FROM `mybb_offers` a
              LEFT JOIN offerscompleted c ON a.ID = c.ID
          WHERE a.`cat` = '$cat' 
              AND `MID` = 'no' 
              AND c.ID IS NULL 
          ORDER BY a.`$orderby` $order 
          LIMIT $page,10";

 

Link to comment
https://forums.phpfreaks.com/topic/116536-solved-loop/#findComment-599774
Share on other sites

$sql = "SELECT a.* 
          FROM `mybb_offers` a
              LEFT JOIN offerscompleted c ON a.ID = c.ID
          WHERE a.`cat` = '$cat' 
              AND `MID` = 'no' 
              AND c.ID IS NULL 
          ORDER BY a.`$orderby` $order 
          LIMIT $page,10";

 

Thank you so much sir.

Link to comment
https://forums.phpfreaks.com/topic/116536-solved-loop/#findComment-599792
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.