Hi
Delete query syntax is
delete from table_name;
so change your query into
runsql("DELETE FROM tBob WHERE ID = " .
$_GET['a'] . ";");
Thanks,
Muthukumar Selvarasu,
Project Manager (Web Development),
Webmasters Ltd.
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of wcwjwd
Sent: Thursday, January 03, 2008 3:57 AM
To: [email protected]
Subject: [php-list] Problem with order of code execution, could be PHP or
SQL.
The fundamental idea behind this (and I can post more explanatory
code if it's needed) is that I have an include file, say:
<?php
//include.inc
function a()
{
if (isset($_GET['a']))
{
runsql("DELETE * FROM tBob WHERE ID = " .
$_GET['a'] . ";");
return true;
}
else
{
return false;
}
}
?>
Then I have a main php with something like:
<?php
//index.php
session_save_path("C:\\WHATEVER\\SOMETHING\\");
session_start();
include "include.inc";
DebugPrint("Start");
$response = a();
DebugPrint("End $response");
//Output stuff
GenerateDropdownFromSQL("SELECT ID, NAME FROM tBob;");
?>
What I see happening is that the delete occurs, but occurs AFTER the
generation of the dropdown, so the dropdown has a nonexistant entry
in it. I have DebugPrint() calls in GenerateDropdownFromSQL also, and
it definitely runs -after- the delete. Is there some kind of SQL
caching going on that I can force through?
My SQL is an ODBC connection to an Access database.
[Non-text portions of this message have been removed]