Jump to content

Joining two tables with the same rows


melo

Recommended Posts

Hi! Can someone help me here? I just got this code from other topics and use it for my system but i have a problem

 

$idList = join (',', array_map('intval', array_keys($_POST['answers'])));		
$sql = "SELECT QuestionId, answer
FROM tblquestion_mc WHERE QuestionId IN ($idList";

 

what i am trying to do is to join my table: tblquestion_default to that code above but i don't know how to. 

 

My tables contain this:

 

table name: tblquestion_mc

QuestionId | Answer

 

table name" tblquestion_default

QuestionId | Answer

Link to comment
https://forums.phpfreaks.com/topic/275771-joining-two-tables-with-the-same-rows/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.