You are here: question about sql query « All PHP « IT news, forums, messages
question about sql query

Posted by gerg on 12/22/05 08:58

This is beyond my scope of knowledge at this point. I've got two
databases, one with "user info", the other with "events".

I'm working on a calendar that at this point selects all user posted
"events" from the events db.

The query is this:

$sql="SELECT * FROM `calendar` WHERE `month`=\"$month\" AND
`year`=\"$year\" ORDER BY `day` asc";

This works great.

Now I want to add into this query, a selection of the "user info"
birthdates and mix them in with the results of the query.

So if I had two events, Jan 1 and Jan 3, and a birthday on Jan 2, the
results would be:

Jan 1. Event
Jan 2. Birthday
Jan 3. Event

How could I modify the sql query below to accomplish this?

$sql="SELECT * FROM `calendar` WHERE `month`=\"$month\" AND
`year`=\"$year\" ORDER BY `day` asc";

Thanks in advance.

Greg

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация