$request = “SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title
FROM
$wpdb->comments AS cm,
$wpdb->posts AS ps
WHERE
ps.ID=cm.comment_post_ID
AND
post_status IN (‘publish’,’static’) “;
every thing is ok. but when i want to get the “user_login” from the wp_users table using this code:
$request = “SELECT ID, comment_ID, comment_content, comment_author, comment_author_url, post_title, user_login
FROM
$wpdb->comments AS cm,
$wpdb->posts AS ps,
$wpdb->users AS us
WHERE
ps.ID=cm.comment_post_ID
AND
us.ID=cm.user_id
AND
post_status IN (‘publish’,’static’) “;
the sql find no results. what am i doing wrong?
The topic ‘recemet comments SQL’ is closed to new replies.
(@ramiy)
17 years, 2 months ago
when i try:
every thing is ok. but when i want to get the “user_login” from the wp_users table using this code:
the sql find no results. what am i doing wrong?