Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: MySQL Array/Join Question.


Message #1 by "Bill" <bige88fan@c...> on Tue, 26 Nov 2002 00:30:58
> THERE IS A PROBLEM:( Everything appears to execute fine, however, I have 5
> total files in my database right now, here it is only displaying 3 out of
> the total 5 files in the database on the page!!! What gives? I've looked
> over everything like 5 times, and have no idea why it will only give me 3
> files. have any ideas?


Without looking too closely, I'd suggest checking the values you're sending in
the LIMIT clause of your query...


> Here is the current query I am using:
> $query ="SELECT files.*,files.date AS fdate,files.game As
> fgame,categories.*,comments.commentid,comments.title as comtitle,
> comments.userid AS comuserid,users.username FROM files
> LEFT JOIN users ON files.userid=users.userid
> LEFT JOIN comments ON files.fileid=comments.fileid
> INNER JOIN categories ON files.archiveid=categories.id
> LEFT JOIN images ON files.game=images.game
> WHERE files.game='$game'
> ORDER BY files.fileid DESC LIMIT $page,$limit";



take care,

Nik


  Return to Index