mysql syntax error, help please.
-
im trying to write a function and i keep getting a mysql sytax error.
heres the part that isnt working:
‘code’
$name = $wpdb->get_results(“SELECT (user_login) FROM $tableusers WHERE user_id = $id”);
‘code’
obviously its suposed to get a users login name from the wp_users table where the user_id is some number.
i have the global vaiables defined at the top like this:
global $wpdb, $tableusers;
so can someone rewrite that line for me?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘mysql syntax error, help please.’ is closed to new replies.