D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] SQL advice

 

I feel a bit guilty to keep asking :-) thanks for the last php help
though everyone. I've cleaned up quite a lot from that advice.

I've kind of "got involved" with something and now its snowballing out
of control so any help is greatly received.

I've overstretched myself this time with the SQL

I am displaying a list of seminars using the following :-

$sql ="SELECT Seminar_id,
Seminar_name,Seminar_Venue,Seminar_Description,UNIX_TIMESTAMP(Seminar_Date)
as date,UNIX_TIMESTAMP(Seminar_Date2) as
date2,Seminar_PDF,Seminar_type, Seminar_paperscall FROM Seminar WHERE
TO_DAYS(NOW()) <TO_DAYS(Seminar_Date) AND ( Seminar_type=\"0\" OR
Seminar_type=\"1\") ORDER BY Seminar_Date ";

Which produces a nice list of forthcomming seminars with the next
seminar at the top of the list.

What i want to do now is start to use the Seminar_paperscall field.
This is a deadline to get  submissions to the seminar in and i want to
produce a list that has the seminars in order as before but
interspersed with any submission deadlines eg :-

Old sql does this :-

2007-06-06 Seminar 1
2007-08-01 Seminar 2
2007-09-06 Seminar 3
2008-01-30 Seminar 4

I want to achieve this:-

2007-06-06 Seminar 1
2007-08-01 Seminar 2
2007-09-01 Deadline for papers for Seminar 4
2007-09-06 Seminar 3
2008-01-30 Seminar 4

Not all seminars have paper deadlines

I can't conceptuly work this one out yet so any advice !!!! (this
might just be more coffee + RTFM)

<begin critisim of my code>

notice no closing tag :-), lol

Thanks

-- 
Robin Cornelius
http://www.byteme.org.uk

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html