Please could you help me by creating a query via the SQL Source Code for the Select field.
CREATE TABLE IF NOT EXISTS #__jcs_user_subscr
(
id
int(10) unsigned NOT NULL auto_increment,
user_id
int(10) unsigned NOT NULL default '0',
subscription_id
int(10) unsigned NOT NULL default '0',
ctime
datetime NOT NULL default '0000-00-00 00:00:00',
published
tinyint(1) unsigned NOT NULL default '1',
extime
datetime NOT NULL default '0000-00-00 00:00:00',
price
float(10,2) NOT NULL default '0.00',
number
varchar(200) NOT NULL default '',
access_count
int(10) unsigned NOT NULL default '0',
access_limit
int(10) unsigned NOT NULL default '0',
gateway
varchar(45) NOT NULL default 'undefined',
gateway_id
varchar(200) NOT NULL default '',
created
datetime NOT NULL default '0000-00-00 00:00:00',
checked_out
int(10) unsigned NOT NULL default '0',
checked_out_time
datetime NOT NULL default '0000-00-00 00:00:00',
parent
tinyint(1) unsigned default '0',
never_activated
tinyint(1) unsigned NOT NULL default '0',
tracking
tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (id
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
CREATE TABLE IF NOT EXISTS #__users
(
id
int(11) NOT NULL auto_increment,
name
varchar(255) NOT NULL default '',
username
varchar(150) NOT NULL default '',
email
varchar(100) NOT NULL default '',
password
varchar(100) NOT NULL default '',
usertype
varchar(25) NOT NULL default '',
block
tinyint(4) NOT NULL default '0',
sendEmail
tinyint(4) default '0',
registerDate
datetime NOT NULL default '0000-00-00 00:00:00',
lastvisitDate
datetime NOT NULL default '0000-00-00 00:00:00',
activation
varchar(100) NOT NULL default '',
params
text NOT NULL,
lastResetTime
datetime NOT NULL default '0000-00-00 00:00:00' COMMENT 'Date of last password reset',
resetCount
int(11) NOT NULL default '0' COMMENT 'Count of password resets since lastResetTime',
PRIMARY KEY (id
),
KEY usertype
(usertype
),
KEY idx_name
(name
),
KEY idx_block
(block
),
KEY username
(username
),
KEY email
(email
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=37 ;
----------What im trying to query in my own words----------
I want to list all "users" from "#__users.username"
If #__jcs_user_subscr.subscription_id` = 2
And #__jcs_user_subscr.user_id=
#__users.id`;
I hope this makes sense
Please could you help me by creating a query via the SQL Source Code for the Select field.
CREATE TABLE IF NOT EXISTS
#__jcs_user_subscr
(id
int(10) unsigned NOT NULL auto_increment,user_id
int(10) unsigned NOT NULL default '0',subscription_id
int(10) unsigned NOT NULL default '0',ctime
datetime NOT NULL default '0000-00-00 00:00:00',published
tinyint(1) unsigned NOT NULL default '1',extime
datetime NOT NULL default '0000-00-00 00:00:00',price
float(10,2) NOT NULL default '0.00',number
varchar(200) NOT NULL default '',access_count
int(10) unsigned NOT NULL default '0',access_limit
int(10) unsigned NOT NULL default '0',gateway
varchar(45) NOT NULL default 'undefined',gateway_id
varchar(200) NOT NULL default '',created
datetime NOT NULL default '0000-00-00 00:00:00',checked_out
int(10) unsigned NOT NULL default '0',checked_out_time
datetime NOT NULL default '0000-00-00 00:00:00',parent
tinyint(1) unsigned default '0',never_activated
tinyint(1) unsigned NOT NULL default '0',tracking
tinyint(1) unsigned NOT NULL default '0',PRIMARY KEY (
id
)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ;
CREATE TABLE IF NOT EXISTS
#__users
(id
int(11) NOT NULL auto_increment,name
varchar(255) NOT NULL default '',username
varchar(150) NOT NULL default '',email
varchar(100) NOT NULL default '',password
varchar(100) NOT NULL default '',usertype
varchar(25) NOT NULL default '',block
tinyint(4) NOT NULL default '0',sendEmail
tinyint(4) default '0',registerDate
datetime NOT NULL default '0000-00-00 00:00:00',lastvisitDate
datetime NOT NULL default '0000-00-00 00:00:00',activation
varchar(100) NOT NULL default '',params
text NOT NULL,lastResetTime
datetime NOT NULL default '0000-00-00 00:00:00' COMMENT 'Date of last password reset',resetCount
int(11) NOT NULL default '0' COMMENT 'Count of password resets since lastResetTime',PRIMARY KEY (
id
),KEY
usertype
(usertype
),KEY
idx_name
(name
),KEY
idx_block
(block
),KEY
username
(username
),KEY
email
(email
)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=37 ;
----------What im trying to query in my own words----------
I want to list all "users" from "#__users.username"
If #__jcs_user_subscr.subscription_id` = 2
And #__jcs_user_subscr.user_id
=
#__users.id`;I hope this makes sense