mysql - Database table not deleted if it's empty -


i have issue following code seems:

$table_name = $wpdb->prefix . "project_name_" . $result2->projectname; $wpdb->query("drop table if exists $table_name"); 

it delets table if has content in it. greate! in cases table may empty. in case it's totaly empty databse table not deleted. why?

how fix this?

kind regards johan

test return of function.

query (string): sql query wish execute.

this function returns integer value indicating number of rows affected/selected. create, alter, truncate , drop sql statements, function returns true on success. if mysql error encountered, function return false. note since both 0 , false may returned, can use equality == operator test falsy returns (i.e., returned value logically false). using identicality === operator may result in unexpected behavior compares types returned in addition values...

class reference/wpdb


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -