PHP : Why cant I send query to database?

Sean

New member
//I have opened a connection to my database;

$conn=odbc_connect(my information);

//and when a form returns to the page..
$ida=$_POST['person']; //gets an id value
$stmt=odbc_prepare($conn,"Select * from writer where idla=$ida");

$idbook=odbc_result($stmt,3); //i want the value in the 3rd column

$sql="delete from writer where idla=$ida"; //sql i want to pass now
$cmd=odbc_execute($conn,$sql); //!!!!!!!!!Does not work..!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Output:
Warning: odbc_execute() [function.odbc-execute]: No array passed


I have this issue with majority of sql i wish to pass to database, what is wrong?
 
Back
Top