homepage Welcome to WebmasterWorld Guest from 54.196.62.132
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Mysql JOIN bug?
Sandro87




msg:4080815
 10:16 pm on Feb 15, 2010 (gmt 0)

$query = "SELECT * FROM articles
INNER JOIN sections ON articles.section_id = sections.id_section
INNER JOIN authors ON articles.author_id = authors.id_author
INNER JOIN releases ON articles.id_release_n = releases.release_n
LEFT JOIN comments ON articles.id_article = comments.id_article_com"



the comments table has temporarily 5 rows for testing, when I do a mysql_fetch_array on the query the first row of the comments table is skipped, is this a bug?
Of course id_article_com is for all 5 rows the same.
The only solution was to make another query which gives all the rows.

 

whoisgregg




msg:4083183
 10:39 pm on Feb 18, 2010 (gmt 0)

Could you post the snippet of code where you output the result of mysql_fetch_array?

syber




msg:4083976
 5:34 pm on Feb 20, 2010 (gmt 0)

Does the first comment record have a matching releases record? If not, you will not see the row.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved