php - What is wrong with this mysql statement - INSERT INTO ... WHERE ... OR? -
this mysql statement reason isn't working , can't figure out why. in advance!
$id = $_get['post']; $length = $_post['excerpt_length']; more code here connect , select db... mysql_query(" insert wp_posts (excerpt) values(" . $length . ") id = " . $id . " or post_name '" . $id . "%'"); this wordpress , i'm making option add excerpt length because far aware, there isn't yet. thanks!
ethan brouwer
you cant use in insert because supposed create new record, there no referenced for. must use update instead.
mysql_query(" update wp_posts set excerpt = '" . $length . "' id = '" . $id . "' or post_name '" . $id . "%'");
Comments
Post a Comment