The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Trying to do a Left Join in SQL Query
PHP Code:
From what I have been told, a left join is what I need to do but I'm really confused beyond belief on how to do it. As you can see above I have a normal looking while loop. What I want to do is order everything by $move[name]. The problem is right now I have to use a fetch array inside the loop to do so. How can I take that first query and sort everything by something inside the query such as $move[name]? |
#2
|
||||
|
||||
[sql]
SELECT * FROM sales LEFT JOIN items ON (items.id=sales.moveid) WHERE buyerid=0 AND datecompleted=0 AND type=1 AND ($time-datestarted)/86400 <= 5 ORDER BY items.name ASC LIMIT $membersdisplay,$membersnum [/sql] |
#3
|
||||
|
||||
That worked to perfection! Thanks
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|