On Thu, 2003-10-09 at 17:35, pete M wrote:
http://www.php.net/manual/en/function.mysql-error.php
Ben Edwards wrote:
On Thu, 2003-10-09 at 16:33, pete M wrote:
$new_id = mysql_query('select last_insert_id()');
your can also user it within a query - eg
$sql = ' insert into related
Use echo(mysql_error());
-Original Message-
From: Ben Edwards [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 5:43 AM
To: pete M
Cc: PHP DB List
Subject: Re: [PHP-DB] mysql_error() (was Re: Getting last insert id?)
On Thu, 2003-10-09 at 17:35, pete M wrote:
http://www.php.net
http://www.php.net/manual/en/function.mysql-error.php
Ben Edwards wrote:
On Thu, 2003-10-09 at 16:33, pete M wrote:
$new_id = mysql_query('select last_insert_id()');
your can also user it within a query - eg
$sql = ' insert into related table parent_id, data , data2) values
On Thu, 2003-10-09 at 16:33, pete M wrote:
$new_id = mysql_query('select last_insert_id()');
your can also user it within a query - eg
$sql = ' insert into related table parent_id, data , data2) values
(last_insert_id(), 23, 45);
Is there also a similar way of getting the last error