try something like this
select customer,max(time),name
from customers join projects on projects.parent_id=customer.id
group by customer;
regards
Pure Web Solution
http://www.purewebsolution.co.uk
PHP, MYSQL, Web Design & Web Services
Barry <[EMAIL PROTECTED]> wrote:
> Gabriel PREDA wrote:
> >
|06|03 |My small Project|2005-02-10|
|07|03 |My big Project! |2005-06-11|
Small mistake. The project with ID 06 should have a date above ID 07.
Sorry for that!
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)
--
MySQL General Mailing List
For li
Gabriel PREDA wrote:
About the first problem I think you need to give us more data !
Okay i thought yesterday how i can make up some real problem and have this:
Guess you have a database with customers and a database with projects.
Those prijects have timestamps so you know what time he added
Barry,
Hello Everyone!
Probably somone can help me out.
I have 2 databases and it looks like:
(Wayne Ratliff is dead but his mistake lives on :-) ). You mean tables,
right?
db1 Project 1
db2 Subproject 1
db2 Subproject 2
db1 Project 2
db2 Subproject 1
db1 Project 3
db2 Subproject 1
About the first problem I think you need to give us more data !
As for the seccond... I haven't sen such loops yet...
But you can go arround them and do something like:
SELECT * FROM db WHERE (id BETWEEN 5 AND 50) AND id%5=0
--
Gabriel PREDA
Senior Web Developer
Hello Everyone!
Probably somone can help me out.
I have 2 databases and it looks like:
db1 Project 1
db2 Subproject 1
db2 Subproject 2
db1 Project 2
db2 Subproject 1
db1 Project 3
db2 Subproject 1
db2 Subproject 2
db2 Subproject 3
What kind of a query would give me the first Subproj
shaun thornburgh wrote:
Hi,
The following query returns the amount of hours a user has been booked
for on a particular day.
SELECT (SUM(((DATE_FORMAT(B.Booking_End_Date, "%k") * 60 ) +
DATE_FORMAT(B.Booking_End_Date, "%i")) -
((DATE_FORMAT(B.Booking_Start_Date, "%k") * 60 ) +
DATE_FOR
Hi,
The following query returns the amount of hours a user has been booked for
on a particular day.
SELECT (SUM(((DATE_FORMAT(B.Booking_End_Date, "%k") * 60 ) +
DATE_FORMAT(B.Booking_End_Date, "%i")) -
((DATE_FORMAT(B.Booking_Start_Date, "%k") * 60 ) +
DATE_FORMAT(B.Booking_Start_Date, "%i")))
Bernd Jagla wrote:
Hi there,
I have some rather complicated sql statements that seem to eat up all resources from
mysqld.
Once I have two of them running at the same time no one can log on any more. Simple
queries involving distinct get a out of memory error.
We have tried changing the index buf
Hi there,
I have some rather complicated sql statements that seem to eat up all resources from
mysqld.
Once I have two of them running at the same time no one can log on any more. Simple
queries involving distinct get a out of memory error.
We have tried changing the index buffer size from 256M
Hi,
I have a table that contains something like follows:
id prop_name status action_date
prop_type address
1 name1 ok 2001-12-12
1 addy1forname1
2 name2
11 matches
Mail list logo