Access' version of SQL is a slight bit different from ANSI SQL. All he needs to do in his statement is change it to this:
$query="DELETE * FROM Test_Table WHERE name='franco';";
(notice the wildcard in there-- Access isn't smart enough to realize that the deletion of any information in a row automatically means deleting the entire row. I guess the original design must've intended to use delete for an update <columnname> = null.)
Uzi Klein wrote:
Match Case ?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, May 02, 2004 09:19
To: [EMAIL PROTECTED]
Subject: [PHP-DB] - Delete records in an Access DB
Hi all, I have this problem:
I want to delete records in an Access DB. I use this code:
$query="DELETE FROM Test_Table WHERE name='franco';"; // the connection parameters
$cn_string.="Data Source=$dsource;" ;
// object Recordset and send query by Open() metod
$rs=new COM("ADODB.Recordset") ;
// clean Recordset object
/* close connection */
but I have this error message:
Fatal error: Call to undefined function: open() in D:\Inetpub\webs\metagenonlinecom\canc.php on line 11
Where is the problem? Is this the correct way to delete records from an Access DB? If this is a bad tecnic, can you suggest me what is the correct way?
Thanks in advance to all.
(The server where this script run is a Microsoft server).
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php