select-query

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Miku
Forum Newbie
Posts: 2
Joined: Tue Jan 25, 2005 5:16 am
Location: Finland

select-query

Post by Miku »

Can I do sql-query that selects all fields, but by choise it discards some specified fields ?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

you mean order by rand() and limit the rows in the resultset?
Miku
Forum Newbie
Posts: 2
Joined: Tue Jan 25, 2005 5:16 am
Location: Finland

Post by Miku »

Well, I mean that if i have for example fields f1,f2,f3,f4_en, f4_fi etc.. How I select fields f1,f2,f3 and by users choise f4_en or f4_fi ?
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

yea just have a form with some check boxes or radio buttons that let them choose and then in your query hardcode in the ones you always want selected, and add in (after validation), the chosen ones.
Post Reply