473,406 Members | 2,619 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,406 software developers and data experts.

Multiple results in a quey

I'm using PHP to display a list of statistic information about a
site. Sometimes I need to retrieve mixed information from the
database but I don't know which is the best method to do it.

For example I need the top requested html pages and the most
repeated value from a column. I dont know if I should make two
different queries in the php file or it's more efficient to make
only one query with an extra column like...

id | ip | date | page | max |
--------+--------------+----------+----------+---------|
1 + 24.125.24.25 + 24/5/03 + index + 3 |
2 + 24.125.24.25 + 24/5/03 + top + 3 |
3 + 20.12.12.21 + 24/5/03 + index + 3 |
4 + 200.12.24.25 + 24/5/03 + left + 3 |
5 + 24.1.6.255 + 24/5/03 + left + 3 |
6 + 24.125.24.12 + 24/5/03 + index + 3 |

Thanks in advance!
Jul 19 '05 #1
0 1764

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

Similar topics

7
by: Brian Kelley | last post by:
I am trying to use threads and mysqldb to retrieve data from multiple asynchronous queries. My basic strategy is as follows, create two cursors, attach them to the appropriate databases and then...
17
by: Andrae Muys | last post by:
Found myself needing serialised access to a shared generator from multiple threads. Came up with the following def serialise(gen): lock = threading.Lock() while 1: lock.acquire() try: next...
66
by: Darren Dale | last post by:
Hello, def test(data): i = ? This is the line I have trouble with if i==1: return data else: return data a,b,c,d = test()
2
by: Ringo Langly | last post by:
Hi all, I need to put multiple results in one field, but not sure how. Here's some sample code: select a.name, a.accountnum, a.ordernum, (select itemid from items where items_ordernum =...
3
by: wxbuff | last post by:
I have a report based on our product names that consists of two parts. Both insert data into a temporary table. 1. A single grouped set of results based on all products 2. Multiple tables based...
2
by: pengbsam | last post by:
Hello: I need to write a program that search through multiple level BOM, get all the items. It seems like a easy enough project, but when I put my hands on it and couple of hundred lines of codes...
0
by: redpears007 | last post by:
Morning all! :) I have a database with multiple linked tables. I have created a search form with one txt box, for entering search criteria, and a listbox for each of the tables to isplay the...
0
by: =?Utf-8?B?ZHZhbg==?= | last post by:
I'm looking for best pratice examples on how to call multiple (1 to n) web services asynchronously (server side) than merge the results from these web service in to one result set. I've written...
1
by: rparcha | last post by:
How to convert following MS access quey to SQL server statement ACCESS: Testx: IIf(Mid(dbo_ITMaster!City,1,2)="AB",IIf(Mid(dbo_ITMaster!Plan,1,3)<>"XYZ","M",IIf(dbo_ITMaster!Center="1111", "A",...
4
by: gblack301 | last post by:
Hi, I have a search form where the user can check a box or enter some data such as a name to quey the database. I was wondering what is the best way to enable the ability for a user data in more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.