How about this for query?
function query($sql) {
// this is to query the DB tables
if($retVal = mysql_query("SELECT my_col FROM my_tbl") {
return $retVal;
} else {
//class variables and function calls are always proceeded with $this->
//from inside their own class.
$this->error = __FILE__ . " on line " . __LINE__ . "Could not query: " . mysql_error();
//we cannot return 0 because their might not be any rows in which case this
//would return 0 on a success.
return -1;
} //end if
}//end query
What do I replace my_col and my_tbl with ? I think I need to assign a variable, but where do I get the variable from ?
The DB contains 2 tables, bill and paid.