You are here: only one row in the table can have a certain value « PHP Programming Language « IT news, forums, messages
only one row in the table can have a certain value

Posted by chris_huh on 03/24/07 01:16

I have a mysql database with a 'feeds' table in it allowing the use to
add feeds to their site. What i also want is for them to be able to
choose one to show on the homepage (or none), but only one. Is this
possible by having a field in the table called 'homepage' which is set
to 'no' for all but one (at the most). They would then be able to
choose which one to show by a list of all the feeds being generated
and they can select a radio button for that feed.

The only other way i can think of is to have another table with one
row in it which JOINS to the other one, but that may be getting more
messy if they is a simple way with one table.

 

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

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