Thursday, 7 January 2016

function for query the database in PHP

//function of query

function runqueries($query) {
$result = mysql_query($query);

while($rowss = mysql_fetch_array($result))

{
   $listingdata[] = $rowss;

 
}
if(!empty($listingdata))
return $listingdata;
}


//Where need to display Data

$sqls= runqueries("SELECT * from Products");

foreach($sqls as $rows)

{


}

No comments:

Post a Comment