Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove a line in access DB

Status
Not open for further replies.

GroundZero

Programmer
Feb 1, 2001
28
CA
I want to remove a row in my Access DB but I can't get it to work. Can anyone see what I am doing wrong:


<?php

//connect to database
$connect = odbc_connect(&quot;flash_java_xml&quot;, &quot;&quot;, &quot;&quot;) or die(&quot;couldn't connect.&quot;);

//query the user table for room and message
$query =&quot;DELETE * FROM emplacement&quot;;
$query .=&quot;WHERE ID=$dbID&quot;;

//perform the query
$result = odbc_do($connect, $query);

print(&quot;&erased=1&&quot;);

//disconnect from database
odbc_close($connect);

?>

thank you in advance,

GroundZero Your soul is imperfect
Life is difficult...

Now guess why we're here
 
Try this instead of the query you've got:

//query the user table for room and message
$query =&quot;DELETE * FROM emplacement WHERE ID='$dbID'&quot;;

That shoudl do it :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top