please help--php query not working

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

i have the following query as part of a basic search engine.
it wont work at the web host.  i have more code but this is the
offending query.  it works in the mysql control center.
the webhost uses phpmyadmin.  however the mysql control center isnt
replicated production environment (some things are a little different);

i did some prints to test the result of the function and $z1 and $z4
inside a print look like this print("z1 is $z1") ... z1 is

an old friend use to say i feel like some third evil force is zapping
me.  this one has me really scratching my head.

please help.

function orSql($o1,$o2)
    or die("ERROR: Could not connect to database!");
     mysql_query("drop table d1");
      mysql_query("drop table d2");

    $z1=sprintf("create temporary table d1 SELECT p.page_url as url,
count(*)as occurrences
    FROM page p, word w, occurrence o where
    (w.word_word=%s or w.word_word=%s) and      p.page_id = o.page_id
    w.word_id = o.word_id
    group by p.page_url

    ORDER BY occurrences DESC LIMIT %s",

     $z4=mysql_query("select * from d1");

    return $z4;


Re: please help--php query not working

hi again-

never mind.  an adjustment here and an adjustment there
and it is working now.  i was running out of time and
patience last night.

thanks very much,

Site Timeline