Object Oriented Style Turn on error reporting Displaying error with ->prepare() sql statement There is an issue with this in that you need to first use $stmt=False; if using $stmt again, otherwise $maindb->error will be empty. Explanation here: https://stackoverflow.com/questions/40719953/mysqli-prepare-returns-false-but-mysqli-error-is-an-empty-string Procedural Style Displaying A MySQL Error die(mysql_error()) is very handy when debugging why a MySQL function isn’t […]