This is the first time i'm using MySQL... So plz forgive me if i say something wrong..
Here it goes:
I'm using
Expand|Select|Wrap|Line Numbers
- function product($var){
- $query = "SELECT Field01, Field02 FROM Table00 WHERE Field01 ='$var'";
- $export = mysql_query($query);
- $fields = mysql_num_fields($export);
- for ($i = 0; $i < $fields; $i++) {$header .= mysql_field_name($export, $i) . "\t";}
- while($row = mysql_fetch_row($export)) {$line = ''; foreach($row as $value) { if ((!isset($value)) OR ($value == "")) {$value = "\t";
- } else { $value = str_replace('"', '""', $value); $value = '"' . $value . '"' . "\t"; } $line .= $value; } $product.= trim($line)."\n";}
- echo $product;}
- ?>
Expand|Select|Wrap|Line Numbers
- <option value=''><?php product ($var); ?></option>
So far so good...
Now the problem...
I need to query in another field, but don't want that it apears on the select box...
I just wanna echo that field in a row later in the script...
Confused???
I need to use something like this:
Expand|Select|Wrap|Line Numbers
- $query = "SELECT Field01, Field02, Field03 FROM Table00 WHERE Field01 ='$var'";
Expand|Select|Wrap|Line Numbers
- $anothervar = $row ["Field03"];
Is there a way to do this or am i improvising to much....
Thanks in advanced for the brave membres that answer me...
[i know i can complicate things.... :)]
Se7eN