Go Back   Mosets Community > Mosets Tree 3.x > Discussions, Troubleshooting & Problems

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-13-2019, 08:46 PM
tazzarkin tazzarkin is offline
Mosets'd
 
Join Date: Jan 2012
Posts: 76
Default Add User Name to Mosets MySQL View 01-13-2019

I created a view to show some basic fields. In Mosets, I was able to find the user_id in the Mosets table. However, I can not find the UserName associated with the user_id.

However, how can I add the UserName associated with user_id?
Would that be in a different table?

Below is my current view:

Code:
SELECT c.cat_id catid, c.cat_name category, l.link_id AS linkid, l.link_name AS linkname, l.price AS price, l.website AS website, l.fax AS faxnum, l.telephone AS telephone, l.address as addressnum, l.user_id AS userid, cl.link_id AS mainlinkid, c.cat_id AS maincatid
 FROM jos_mt_cats AS c, jos_mt_links AS l, jos_mt_cl AS cl
 
 WHERE c.cat_id=cl.cat_id AND l.link_id=cl.link_id AND cl.main=1
How can I add UserName to my view?

Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 01-14-2019, 03:53 PM
tazzarkin tazzarkin is offline
Mosets'd
 
Join Date: Jan 2012
Posts: 76
Default Solved It

Sorry, it was a simple change. I figured it out.

The answer is below:

Code:
SELECT c.cat_id catid, c.cat_name category, l.link_id AS linkid, l.link_name AS linkname, l.price AS price, l.website AS website, l.fax AS faxnum, l.telephone AS telephone, l.address as addressnum, l.user_id AS userid, cl.link_id AS mainlinkid, c.cat_id AS maincatid, u.name AS name, u.username AS users
 FROM jos_mt_cats AS c, jos_mt_links AS l, jos_mt_cl AS cl, jos_users AS u
 
 WHERE c.cat_id=cl.cat_id AND l.link_id=cl.link_id AND cl.main=1 AND l.user_id=u.id
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add User Name to Mosets MySQL View 01-13-2019 tazzarkin Mosets & Joomla 1 01-13-2019 08:47 PM
How to add a core field to Mosets Tree stevenkong Discussions, Troubleshooting & Problems 6 03-12-2012 08:46 PM
Mosets Tree 2.0 released dknight Announcements 0 08-02-2007 05:32 PM


All times are GMT +8. The time now is 06:38 PM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.