<?php
function checkplace($name)
{
$query = mysql_query("SELECT * FROM `place` WHERE name=$name");
while($p = mysql_fetch_array($query))
{
echo $p['name'];
}
}
if($codecall == 'open')
{
checkplace('open');
//Some code here
}
if($codecall == 'close')
{
checkplace('close');
//Some code here
}
if($codecall == 'good')
{
checkplace('good');
//Some code here
}
//Some code here
checkplace('all');
?>
I call function checkplace() many time in my files and this make many query reading now I want to have sth which make it less?guide me to have less one ?
One Query or Two!


Sign In
Create Account


Back to top









