Skip to content

Instantly share code, notes, and snippets.

/Whatever Secret

Created January 18, 2013 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/264631ec7c61c06d59cc to your computer and use it in GitHub Desktop.
Save anonymous/264631ec7c61c06d59cc to your computer and use it in GitHub Desktop.
public function Furnis($c_id)
{
if(isset($c_id))
{
$furnis = self::$c->query("SELECT * FROM items WHERE c_id='".$c_id."'");
if($furnis->num_rows)
{
$row = $furnis->fetch_array(MYSQLI_NUM);
foreach($row as $k => $v)
{
$efurnis[] = $v;
}
return $efurnis;
$furnis->free();
}
else
{
return $error = true;
}
}
else
{
$furnis = self::$c->query("SELECT * FROM items ORDER BY id DESC");
$row = $furnis->fetch_array(MYSQLI_ASSOC);
foreach($row as $keys)
{
$efurnis[] = $keys;
}
return $efurnis;
$furnis->free();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment