Datebase Class??
Posted: Tue Mar 09, 2004 12:03 pm
Hi,
im tring to create a database class
i have it connectig using it
and i can select the first record. BUT i want to be able to select ALL records from the database (well the ones that match the query). so that i can access them after teh function has run
This what i have so far
then in the db class file
then back in the other file
is that which calls
back to the other file!
that last line prints the field of the first record depending on ghe number
if you need more details of what am i after, ill try to give me
cheers
Andrew
im tring to create a database class
i have it connectig using it
and i can select the first record. BUT i want to be able to select ALL records from the database (well the ones that match the query). so that i can access them after teh function has run
This what i have so far
Code: Select all
$query = "SELECT * FROM forensis_post_formating";
$result = $myDB->query_select($query);Code: Select all
function query_select($query)
{
$result = mysql_query($query);
return $result;
}Code: Select all
$fetch = $myDB->Fetch($result);Code: Select all
function Fetch($result)
{
$fetch = mysql_fetch_array($result);
return $fetch;
}Code: Select all
print $fetchї3];that last line prints the field of the first record depending on ghe number
if you need more details of what am i after, ill try to give me
cheers
Andrew