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 } 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... 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 Link to comment https://forums.phpfreaks.com/topic/190826-confirming-record-creation/#findComment-1006317 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.