By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,716 Members | 1,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,716 IT Pros & Developers. It's quick & easy.

please help--php query not working

P: n/a

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;
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
"j-marvin" <cu******@service.boy> wrote in

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,
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.