I tried to get some data from my function but I couldn't, Can any one help me
I have some data in functions file, from this page into my index page
public function selectData($table, $where = null, $wheree = null, $where1 = null, $wheree1 = null) {
$QUERY = mysql_query("SELECT * FROM " . $table . " WHERE '" . $where . "' = '" . $wheree . "' && '" . $where1 . "' = '" . $wheree1 . "'");
$Fetch_Assoc = mysql_fetch_assoc($QUERY);
$Num_Rows = mysql_num_rows($QUERY);
$Fetch_Array = mysql_fetch_array($QUERY);
$Fetch_Object = mysql_fetch_object($QUERY);
but when I want extract data from my database using mysql_fetch_assoc in index file, it doesn't work, you'll find what I want to do in the data below
<?php include 'files/header.php';
$getData = $user->selectData('newpost');
$QUERY->Fetch_Assoc;
echo $Fetch_Assoc['P_id'];
can any one help me plzz