[Phplib-users] DB class
Brought to you by:
nhruby,
richardarcher
From: Guenther T. <th...@eq...> - 2001-09-05 12:17:50
|
Hi, I've got a table with about 100 columns (value either 0 or 1). Now I choose exactly one row with $db->query ("SELECT...") For each column there is a picto. The name of the picto is name_of_column.gif I want to show all the pictos where the value in the column is 1. Of course one way would be like this: $test=$db->f("foo") if ($test==1) {show foo.gif} With about 100 columns which even might change in the next time, this seems quite complicated to me. Is there a more elegant way to get the names of the coloumns where the value is 1 out of $db? thanks Guenther -- eqi Web-Design + Infanterieweg 30 + 26129 Oldenburg Tel: 0441 / 77 81 333 + Fax: 0441 / 99 89 02 20 mailto:th...@eq... + http://www.eqi.de |