Jump to content

multiple table queries? Please help


renfley

Recommended Posts

So here is the deal

i am querying one table withing the database and displaying them within another view.

 

if( strtolower( $language->_lang ) == "fr-fr" )

$query = "Select id,idea_1 as title, challenge_id as challenge, is_anonymous from " .

$db->nameQuote('#__table1_ideas') . " where userid = '" . $user->id . "' and is_draft =  '0'";

else

 

Prob is i also need challenge title from another table If anyone can help me out that would be great

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/242011-multiple-table-queries-please-help/
Share on other sites

 

if( strtolower( $language->_lang ) == "fr-fr" )

        $query = "Select id,idea_1 as title, challenge_id as challenge, is_anonymous from " .

        $db->nameQuote('#__table1_ideas') . " where userid = '" . $user->id . "' and is_draft =  '0'";

      else

 

i want to extract from table2 the challenge_title based on the challenge_id pull from table one if that makes sense 

 

Again thanks man

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.