Hi people: Can anybody help me with this? :
I've got a query in a table: $result = mysql_query("SELECT username, email FROM users"); which should bring about 300 lines (each for an user). Now, I've created a funtion which controls how many fields (cols) may be seen by user. Some like this: function select_query ($fields, $table) { $result = ("SELECT $fileds FROM $table"); } Well, I hould like to control how many fields my query will use. For example: if I call select_query('id,username,email', 'users'); I want to know that there was selected 3 cols. so I can later do some like this: for ($j=0;$j<$number_of_selected_cols_minus_one;$j++) { echo"<td>$list[$j]</td>"; ... and that's it. By the way!! Is this late statement correct?!?! Thanks a lot to anyone that can help me, cheers, bsantos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php