RE: [PHP] for??????
| From: | John W. Holmes | Date: | Mon, 28 Oct 2002 17:47:30 +0000 |
| Subject: | RE: [PHP] for?????? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121751@lists.php.net to get a copy of this message | ||
> 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');
$num_fields = count(explode(',',$passed_fields_string));
or
$num_fields = mysql_num_fields($result_set);
---John Holmes...