Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- please help--php query not working
October 11, 2004, 2:36 pm
rate this thread
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.
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,
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");