Missing argument 2 for wpdb::prepare()
-
I updated wordpress to 3.5.There is one error occurs:
Warning: Missing argument 2 for wpdb::prepare(), called in /home/... and defined in /home/cameraqu/public_html/wp-includes/wp-db.php on line 990 4 items)My code:
function countOrders () { global $ wpdb; $ ordersTable = 'wp_orders'; $ count = $ wpdb-> get_var ($ wpdb-> prepare ("SELECT COUNT (*) FROM $ ordersTable;")); return $ count; }It error line $ count = $ wpdb-> get_var ….
helpppppppppppppppppppppp
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Missing argument 2 for wpdb::prepare()’ is closed to new replies.