Use of two or more variables

A multipurpose module, plugin and component

Use of two or more variables

New postby marcos_tam » Thu Feb 27, 2014 9:35 pm

Hi!!

I'm working with Joomla, the information I have in "profile_value" on table user_profile obtain the ID and make another query in the USER table to get the name.

I want to run two SQL queries, ie, the result of the first query to use the other query. example:

$query= 'SELECT user_id FROM #_user_profile WHERE profile_value=sistemas';

$query2= 'SELECT name FROM #_users WHERE id= $query ';

Is there any way to do this?
You can?

I appreciate your help!
Greetings!

note: I try to use INNER JOIN to join the tables but I do not recognize the WHERE.
marcos_tam
 
Posts: 1
Joined: Thu Feb 27, 2014 9:06 pm

Return to Jumi

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests

cron