Cold Assassin Posted April 7, 2009 Share Posted April 7, 2009 ok... I need help with an SQL Syntax and code I'm trying to run. Its for my vBulletin Forums. I'm trying to create a query that would display data on a php page...I dont need help with the php just the SQL syntax. The Syntax is as follows (I'll explain later) SELECT `username`, `usertitle`, `aim`, `membergroupids`, `usergroupid`, `title`, `gamertag` FROM `vBuser` FULL JOIN `vBgxboxlive`,`vBusergroup` ON vBuser.userid = vBgxboxlive.userid, vBuser.membergroupids = vBusergroup.usergroupid WHERE `usertitle` Like '[sGx%' ORDER BY `membergroupids` DESC,`username` Now let me explain my self... SELECT `username`, `usertitle`, `aim`, `membergroupids` Are from a table called "vBuser" SELECT `usergroupid`, `title` Are from a table called "vBusergroup"and SELECT `gamertag` is from a table called "vBgxboxlive"Now what im doing is creating a roster sorta thing so it will display all the members in a certain group (`usertitle` Like '[sGx%')I got a part that matches the field `userid` (from table vBuser) to field `userid` (from table vBgxboxlive). That works and also the `aim`, `username`, `usertitle` works! :)The only thing I need help along with is the matching of the `gamertag` `userid` (from vBxboxlive table) I also want it to match `membergroupids` (from vBuser table) to `usergroupid` (from vBusergroup table) and if they match display `title` (from vBusergroup table)I can get the display `title` in the php code...I believe its just an echo of ['title']Thanks to any1 that can help Link to comment Share on other sites More sharing options...
Cold Assassin Posted April 7, 2009 Author Share Posted April 7, 2009 ok... I need help with an SQL Syntax and code I'm trying to run. Its for my vBulletin Forums. I'm trying to create a query that would display data on a php page...I dont need help with the php just the SQL syntax. The Syntax is as follows (I'll explain later) SELECT `username`, `usertitle`, `aim`, `membergroupids`, `usergroupid`, `title`, `gamertag` FROM `vBuser` FULL JOIN `vBgxboxlive`,`vBusergroup` ON vBuser.userid = vBgxboxlive.userid, vBuser.membergroupids = vBusergroup.usergroupid WHERE `usertitle` Like '[sGx%' ORDER BY `membergroupids` DESC,`username` Now let me explain my self... SELECT `username`, `usertitle`, `aim`, `membergroupids` Are from a table called "vBuser" SELECT `usergroupid`, `title` Are from a table called "vBusergroup"and SELECT `gamertag` is from a table called "vBgxboxlive"Now what im doing is creating a roster sorta thing so it will display all the members in a certain group (`usertitle` Like '[sGx%')I got a part that matches the field `userid` (from table vBuser) to field `userid` (from table vBgxboxlive). That works and also the `aim`, `username`, `usertitle` works! :)The only thing I need help along with is the matching of the `gamertag` `userid` (from vBxboxlive table) I also want it to match `membergroupids` (from vBuser table) to `usergroupid` (from vBusergroup table) and if they match display `title` (from vBusergroup table)I can get the display `title` in the php code...I believe its just an echo of ['title']Thanks to any1 that can help I believe I answered my owh question, I have to create another query code and use "next" in the while statement to call it! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.