The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

problem with sql-statement

Discussion in 'Database Discussions' started by telleus, Jul 18, 2007.

  1. telleus

    telleus Registered

    Jun 19, 2007
    Likes Received:
    Trophy Points:
    We have an odd problem that i can't find any solution to. A user on one of our servers are fetching data from a mysql-db in his php-script, the sql-statement looks like this:

    SELECT kvalitetspanel.distrikt, kvalitetspanel.namn, kvalitetspanel.kommentar, kvalitetspanel.telefon, kvalitetspanel.adress, kvalitetspanel.postadress, kvalitetspanel.ort, kvalitetspanel.kategori, panelsvar.op, panelsvar.svar, panelsvar.tid, panelsvar.vecka, bokning.kommentar as bokom, bokning.namn as utdelare
    FROM kvalitetspanel, panelsvar, bokning
    WHERE kvalitetspanel.telefon = panelsvar.telefon
    AND panelsvar.vecka = bokning.vecka2007-02-16 14:51
    AND kvalitetspanel.distrikt = bokning.distrikt
    AND bokning.distrikt = ''
    AND (
    panelsvar.svar = 'J'
    OR panelsvar.svar = 'N'
    ORDER BY panelsvar.tid desc;

    In phpMyAdmin this query is executed in 0.4855 sec. But when this script is used on the users account it takes forever. We are using php4.4.7 (phpsuexec) and mySQL 4.1.22. Does anyone have a solution to our problem?


Share This Page