Home > Archive > PHP DB > April 2004 > RE: [PHP-DB] Pear - autoExecute()
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
RE: [PHP-DB] Pear - autoExecute()
|
|
| Uzi Klein 2004-04-30, 1:03 am |
|
http://pear.php.net/manual/en/package.database.php
-----Original Message-----
From: pete M [mailto:pmorgan@ukds.net]
Sent: Thursday, April 29, 2004 14:03
To: php-db@lists.php.net
Subject: [PHP-DB] Pear - autoExecute()
Am trying the following bit of code usind the PEAR DB.php class
$table = 'reports';
$fields = array('report_name' => $_POST['report_name'],
'report_desc' => $_POST['report_desc']
);
$res = $db-> autoExecute($table,$fields,DB_AUTOQUERY_
INSERT);
if (DB::isError($res)) {
die($res->getMessage());
}
However I get the error
Fatal error: Call to undefined function: autoexecute() in
/home/jp/public_html/v1/reports.php on line 19
I'm using the $db->query() methods and getALL etc so I know the class is
loaded and working.
Is there a library I'm missing
tia
Pete
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
| |
| Pete M 2004-04-30, 8:30 am |
| That's where I copied the code below that does not work ;-(
Uzi Klein wrote:
> http://pear.php.net/manual/en/package.database.php
>
>
>
> -----Original Message-----
> From: pete M [mailto:pmorgan@ukds.net]
> Sent: Thursday, April 29, 2004 14:03
> To: php-db@lists.php.net
> Subject: [PHP-DB] Pear - autoExecute()
>
> Am trying the following bit of code usind the PEAR DB.php class
>
> $table = 'reports';
> $fields = array('report_name' => $_POST['report_name'],
> 'report_desc' => $_POST['report_desc']
> );
> $res = $db-> autoExecute($table,$fields,DB_AUTOQUERY_
INSERT);
>
> if (DB::isError($res)) {
> die($res->getMessage());
> }
>
> However I get the error
> Fatal error: Call to undefined function: autoexecute() in
> /home/jp/public_html/v1/reports.php on line 19
>
> I'm using the $db->query() methods and getALL etc so I know the class is
> loaded and working.
>
> Is there a library I'm missing
>
> tia
>
> Pete
>
| |
| Uzi Klein 2004-04-30, 8:30 am |
| Did you use $db = new DB; ?
-----Original Message-----
From: pete M [mailto:pmorgan@ukds.net]
Sent: Thursday, April 29, 2004 14:31
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Pear - autoExecute()
That's where I copied the code below that does not work ;-(
Uzi Klein wrote:
> http://pear.php.net/manual/en/package.database.php
>
>
>
> -----Original Message-----
> From: pete M [mailto:pmorgan@ukds.net]
> Sent: Thursday, April 29, 2004 14:03
> To: php-db@lists.php.net
> Subject: [PHP-DB] Pear - autoExecute()
>
> Am trying the following bit of code usind the PEAR DB.php class
>
> $table = 'reports';
> $fields = array('report_name' => $_POST['report_name'],
> 'report_desc' => $_POST['report_desc']
> );
> $res = $db-> autoExecute($table,$fields,DB_AUTOQUERY_
INSERT);
>
> if (DB::isError($res)) {
> die($res->getMessage());
> }
>
> However I get the error
> Fatal error: Call to undefined function: autoexecute() in
> /home/jp/public_html/v1/reports.php on line 19
>
> I'm using the $db->query() methods and getALL etc so I know the class is
> loaded and working.
>
> Is there a library I'm missing
>
> tia
>
> Pete
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
| |
| Uzi Klein 2004-04-30, 8:30 am |
|
http://pear.php.net/manual/en/packa...autoexecute.php
-----Original Message-----
From: pete M [mailto:pmorgan@ukds.net]
Sent: Thursday, April 29, 2004 14:31
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Pear - autoExecute()
That's where I copied the code below that does not work ;-(
Uzi Klein wrote:
> http://pear.php.net/manual/en/package.database.php
>
>
>
> -----Original Message-----
> From: pete M [mailto:pmorgan@ukds.net]
> Sent: Thursday, April 29, 2004 14:03
> To: php-db@lists.php.net
> Subject: [PHP-DB] Pear - autoExecute()
>
> Am trying the following bit of code usind the PEAR DB.php class
>
> $table = 'reports';
> $fields = array('report_name' => $_POST['report_name'],
> 'report_desc' => $_POST['report_desc']
> );
> $res = $db-> autoExecute($table,$fields,DB_AUTOQUERY_
INSERT);
>
> if (DB::isError($res)) {
> die($res->getMessage());
> }
>
> However I get the error
> Fatal error: Call to undefined function: autoexecute() in
> /home/jp/public_html/v1/reports.php on line 19
>
> I'm using the $db->query() methods and getALL etc so I know the class is
> loaded and working.
>
> Is there a library I'm missing
>
> tia
>
> Pete
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
| |
| Pete M 2004-04-30, 8:30 am |
| yep
This is from config.inc.php
$dsn = "mysql://$username_DB:$password_DB@$hostname_DB/$database_DB";
//echo $dsn;
require_once('../includes/DB/DB.php');
$db = DB::connect($dsn,true);
if (DB::isError($db)) {
die ($db->getMessage()); }
$db->setFetchMode(DB_FETCHMODE_ASSOC);
I'm using the getAll(), query(), getOne(), etc ok - it just doesnt see
autoExecute() ??
Or I'm missing the obvious !
pete ;-)
Uzi Klein wrote:
> Did you use $db = new DB; ?
>
> -----Original Message-----
> From: pete M [mailto:pmorgan@ukds.net]
> Sent: Thursday, April 29, 2004 14:31
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] Pear - autoExecute()
>
> That's where I copied the code below that does not work ;-(
>
> Uzi Klein wrote:
>
>
>
>
|
|
|
|
|