mohansinfh — 2012-03-28T01:24:58-04:00 — #1
Today, my senior asked me a mysql_query to get number of affected rows, I said that’s very easy “mysql_affected_rows”, but suddenly he asked by which it is done, by using DDL or by DML? I have never heard that a query is DDL or DML.
r937 — 2012-03-28T03:15:50-04:00 — #2
a query is either DDL or DML
but mysql_affected_rows is neither, it is a php function
mohansinfh — 2012-03-28T13:29:58-04:00 — #3
Thank you Rudy Sir.
But the mysql query which in running in backend, and when its outputs comings that "1 row(s) affected", then to which type that backend query belong ?
Is it DDL or DML?
r937 — 2012-03-28T13:35:36-04:00 — #4
which query are you talking about? can i see it?
mohansinfh — 2012-03-28T13:42:12-04:00 — #5
Sir, I am talking about the query which is run in phpmyadmin, when we delete some record in a table. Then it comes in the bottom, that "1 row(s) affected". Is that DDL or DML?
I think that's DML because that message came because Data is manipulated.
r937 — 2012-03-28T14:01:41-04:00 — #6
you are correct -- DELETE is DML
gireeshs — 2012-03-29T07:39:19-04:00 — #7
i also think its DML (data manipulation language)
using DML commands like insert,delete data is manipulated.