Link to home
Start Free TrialLog in
Avatar of cbielich
cbielichFlag for United States of America

asked on

INSERT IGNORE SQL STATEMENT mysql php

When using a statement like INSERT IGNORE INTO table VALUES ('1','2','3') in php

How can I determine if the record was inserted or ignored?

for instance when I want to know if a sql statement executed correctly I would use something like

if ($sql) {
echo "ok";
} else {
echo "Not ok";
}

but since the sql statement executes correctly whether it is skipped or ignored how can I differentiate the two?

SOLUTION
Avatar of nkraynev
nkraynev
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial