Skip to content

Instantly share code, notes, and snippets.

@refaelgold
Created November 6, 2013 08:09
Show Gist options
  • Save refaelgold/7332561 to your computer and use it in GitHub Desktop.
Save refaelgold/7332561 to your computer and use it in GitHub Desktop.
STARTTECH/system/model/model.php 2 query sql
// Events and evenet
public function EventAllInfo($url)
{
global $db;
// return a variable
$db->query("SELECT id FROM `mod_pages` WHERE type='events' AND url='other'");
$count = 0;
$temp = array();
while($temp[$count++] = $db->store(0,1));
$id=$temp[0]['id'];
// return an array
$db->query("SELECT * FROM `event` WHERE `galid`='{$id}'");
$db->store();
$db->realstored();
return $db->stored[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment