473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

please help--php query not working

hi-

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.
thanks,
jim

function orSql($o1,$o2)
{

set_include_path('/home/3rdshift/public_html/php_include/');
include("dbconnect.php");
mysql_connect($host,$username,$password)
or die("ERROR: Could not connect to database!");
mysql_select_db("3rdshift_bookmarks");

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
and
w.word_id = o.word_id
group by p.page_url

ORDER BY occurrences DESC LIMIT %s",
quote_smart($o1),quote_smart($o2),
quote_smart($results=intval($_POST['results'])));

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

return $z4;
}
Jul 17 '05 #1
1 1485
"j-marvin" <cu******@service.boy> wrote in
news:Xn*************************@24.24.2.166:

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: kackson | last post by:
Hi. I've been using SQL server 2000's query analyzer and the enterprise manager without problems for quite some time (2 months). And all of a sudden one week ago, when I started the query analyzer...
5
by: Koen | last post by:
Hi all, I created a function that updates a certain status field. The status can be influenced by four different other fields. So, on the form where I edit these fields I call the function (see...
4
by: technobob | last post by:
I have what seems to be a strange situation. I have a table where Sales are recorded. Most of the time there is only a primary salesman involved (Salesman1). When there is a secondary salesman,...
17
by: erikcw | last post by:
Hi all, I'm trying to run the following query: amember_db = MySQLdb.connect(host="localhost", user="**********", passwd="*****", db="*******") # create a cursor self.amember_cursor =...
7
by: MrHelpMe | last post by:
Sorry everyone, NOTE: I have posted this question to another site but unfortunately, am not getting the answers I need only because those helping haven't worked with ASP. I am in desperate...
2
by: surajhs | last post by:
hi, Get me the working sample links of telnet in java
1
by: lenygold via DBMonster.com | last post by:
I found this query on older thread and i can not uderstand output interval pairs: How to find min and max values in date intervals: -------------------------------------------------- Input:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.