php - getting data from four tables with tight WHERE clause -


i need getting data different tables , insert other different table here queries

"select commentid, date, comment, subject, parentid, abuserid comments status = 'approved'"  "select topicid, subforumid, abuserid, lastpostid, views, replies, startdate topic status = 'approved' , topicid = $parentid";  // $parentid need matched above query parentid,  "select username users abuserid = $cmtabuserid"; // $cmtabuserid = abuserid first query  "select username users abuserid = $topicabuserid"; //$topicabuserid = abuserid second query 

last 2 queries same table using different clause used different inner join left join solutions posted here non of these worked me stuck since last 2 weeks please help

ps data above queries inserted single table need these combined can have them in 1 place

if want perform operation in same query use 'or'

"select username users abuserid = $cmtabuserid or abuserid = $topicabuserid";


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -