RIRedinPA Posted February 3, 2010 Share Posted February 3, 2010 does mysql return anything to confirm a new record was created? For example: $query = INSERT INTO testdb VALUES('1', '2', '3'); $result = mysql_query($query) or die ("Could not make record.\n\n" . mysql_error() . "\n\n" . $query); if ($result) { //do something } Quote Link to comment https://forums.phpfreaks.com/topic/190826-confirming-record-creation/ Share on other sites More sharing options...
RIRedinPA Posted February 3, 2010 Author Share Posted February 3, 2010 does mysql return anything to confirm a new record was created? For example: $query = INSERT INTO testdb VALUES('1', '2', '3'); $result = mysql_query($query) or die ("Could not make record.\n\n" . mysql_error() . "\n\n" . $query); if ($result) { //do something } duh...isset...brain fart, it's 3:00P...brain is slowly shriveling... Quote Link to comment https://forums.phpfreaks.com/topic/190826-confirming-record-creation/#findComment-1006315 Share on other sites More sharing options...
PFMaBiSmAd Posted February 3, 2010 Share Posted February 3, 2010 http://php.net/mysql_affected_rows Quote Link to comment https://forums.phpfreaks.com/topic/190826-confirming-record-creation/#findComment-1006317 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.