473,399 Members | 3,302 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,399 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 1763

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.