Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 COMPLICATION

Author  Topic 

bambi23
Starting Member

2 Posts

Posted - 2012-03-25 : 20:23:00
[code]
<?php
require ("includes/DBConnection.php");
?>

<?php
$id =$_REQUEST['a_id'];

// sending query

//mysql_query("INSERT INTO audittrail(article.a_title,article.a_author,article.a_description,article.a_date, article.dept_id)
//WHERE article.a_id='$id'")

mysql_query("INSERT INTO audittrail SELECT * FROM article WHERE a_id='$id'")

or die(mysql_error());
mysql_query("DELETE FROM article WHERE a_id = '$id'")
header("Location: articlelist-a.php");
?>

[/code]


Parse error: syntax error, unexpected T_STRING in C:\wamp_chieny\www\MULTI\ADMIN_MULTI\article-del.php on line 17

i try to comment this part: mysql_query("DELETE FROM article WHERE a_id = '$id'") and unfortunately it works but i need this syntax to delete certain data row in my table. where should i put the delete syntax?

karl

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-03-25 : 21:41:27
SQLTeam.com is on Microsoft SQL Server not mysql. Please post in a MySQL forum like http://www.dbforums.com/mysql/


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

bambi23
Starting Member

2 Posts

Posted - 2012-03-26 : 05:19:46
sorry, i solved this thread by myself ... .thank you for suggesting that site :)

karl
Go to Top of Page
   

- Advertisement -