Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 17th, 2004, 11:26 PM
ddcarnage ddcarnage is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Montreal, Quebec, Canada
Posts: 2 ddcarnage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ddcarnage
Query jamming mySQL

Hello,

I've been trying to optimise some parts of my site by combining sql calls with join statements. However, I've been having problem with one.

mySQL returns no errors when I try to run it. On my web page, it simply return null for all the fields in the members table. When I try to run the statement with phpmyadmin, the server locks up and doesn't answer anymore.

Here's the sql call :

php Code:
Original - php Code
  1. SELECT post1.ReplyCount, post1.Hits, post1.Sujet, post1.Texte, post1.CheckComment, post1.CheckVote, post1.CheckMature, post1.Author, post1.PostDate, post1.ModifiedBy, post1.ModifiedDate, members.ppcheck AS ppcheck, members.ppfl AS ppfl, members.ppurl AS ppurl, members.FavSaying AS FavSaying, members.ICQ AS ICQ, members.WWW AS WWW, members.UserName AS UserName, members.signature AS signature, members.AccountType AS AccountType, members.PoemCount AS PoemCount, members.CommentCount AS CommentCount, members.Level AS niveau, loggedin.IP AS IP
  2. FROM post1
  3. RIGHT  JOIN members ON members.ID = post1.Author
  4. RIGHT  JOIN loggedin ON loggedin.username = post1.Author
  5. WHERE post1.ID = 9797
  6. LIMIT 0 , 1



Any help greatly apreciated.

Thanks,

Francois.

Reply With Quote
  #2  
Old February 18th, 2004, 09:02 AM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Query jamming mySQL

Why do you use a RIGHT JOIN? I think a LEFT JOIN would be more appropriate.

Reply With Quote
  #3  
Old February 18th, 2004, 06:44 PM
ddcarnage ddcarnage is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Montreal, Quebec, Canada
Posts: 2 ddcarnage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ddcarnage
RE: Query jamming mySQL

Hey thanx a bunch! It fixed the problem.


Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Query jamming mySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT