class.php
class Database {
function select_user($formation,$department,$table)
{
if(($formation=="Select All") and ($department=="Select All"))
{
$select_user=mysql_query("SELECT * FROM ". $table . " order by dateofjoin DESC");
echo "SELECT * FROM ". $table ." order by dateofjoin DESC";
}
else
{
$query="SELECT * FROM". $table ." WHERE formation='$formation' and department='$department' order by dateofjoin DESC";
//echo "SELECT * FROM ". $table ." WHERE formation='$formation' and department='$department' order by dateofjoin DESC";
return ($query);
}
}
viewtudent.php では、次のような関数について議論しています。
$obj= new Database;
$obj->select_user($_POST['formation'],$_POST['department'],'user');
class.php,,thx,,,から値を取得する方法を教えてください。