Hi all,
I'm having just a slight problem in that I have recently installed the PEAR unit, however when ever i try to use either;
fetchRow()
getRow()
I get the following error:
Fatal error: Call to undefined function fetchRow()
or
Fatal error: Call to undefined function getRow()
I assuming this mean that I have managed to balls up the install of PEAR. I would just like some confirmation, i am using the following tutorial script to test the PEAR unit (only showing the relevant part of the script).
<?php
require_once( "DB.php" );
$dsn = 'mysql://root:password@localhost/time';
$db =& DB::Connect( $dsn, array() );
if (PEAR::isError($db)) { die($db->getMessage()); }
$res = $db->query( "SELECT id FROM users WHERE name=? AND password=MD5(?)", array( $_POST['user'], $_POST['password'] ) );
$row = array( null );
if ( $res != null )
$res->fetchInto( $row );
if ( $row[0] != null )
{
session_start();
$_SESSION['user'] = $row[0];
header( "Location: welcome.php" );
}
else
{
header( "Location: index.php?bad=1" );
}
?>
Cheers in advance