How to delete a row in a query using PDO
Posted: Tue Dec 28, 2010 2:07 pm
Hi everybody
First of all, I'm not a native english speaker so I'm sorry for my writting.
I'm developing a web application and I'm using PDO for the comunication with the database and I have several classes which I use for the results.
The point is I have to do a select in a script, and after, regarding to a external event, delete one of them.
I'm reading the results by this way:
$rows_query is a class with some methods.
How coud I delete one row of $query??
Actually the foreach use a copy of $query so I have no idea about how to delete one row of the original query ($query)
Thank you for your attention and I'm sorry again for my english.
Greetings
First of all, I'm not a native english speaker so I'm sorry for my writting.
I'm developing a web application and I'm using PDO for the comunication with the database and I have several classes which I use for the results.
The point is I have to do a select in a script, and after, regarding to a external event, delete one of them.
I'm reading the results by this way:
Code: Select all
foreach ($query as $rows_query)
{
//code...
}
How coud I delete one row of $query??
Actually the foreach use a copy of $query so I have no idea about how to delete one row of the original query ($query)
Thank you for your attention and I'm sorry again for my english.
Greetings