Generic select query in php is using table and select parameters that are used in where class. But if you dont have where class parameters then only table name is required. Here is code for select query in php and mysql.
public function select($table) {
$qry = ‘select * from ‘ . $table. ‘ order by name’ ;

$result = $this->executeQuery($qry);
while ($row = mysql_fetch_assoc($result))
{
$records[] = $row;
}

if ($records == null) {
echo “No employee is added ! Please add an employee”;
}
else
{
return $records;
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *