Re: Table Search
| From: | Chrisy | Date: | Fri, 07 Sep 2001 01:36:54 +0000 |
| Subject: | Re: Table Search | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66307@lists.php.net to get a copy of this message | ||
huntsman@www.nisu.flinders.edu.au (David Robley) typed on Fri, 7 Sep
2001 10:16:57 +0930, :
|On Fri, 7 Sep 2001 10:11, Devon wrote:
|> Below is an example of my code which searches a table and prints the
|> result, the problem is that it only displays the TechContact where I
|> want it to display all the fields that associated with it in that row
|> off the colum eg. Mobile, AdminContact etc etc Any suggestions?
|>
|> if ($TechContact == "")
|> {$TechContact = '%';}
|> $result = mysql_query ("SELECT * FROM enet
|> WHERE TechContact LIKE '$TechContact%'");
|> print $row["TechContact"];
|
|You would need to specify them in a print function, then.
|print $row["Mobile"];
|print $row["AdminContact"]; etc etc
Or count the columns in $row and print $row[0] to $row[count-1]. There
was a way of getting the correct field name....
....which someone else will provide hopefully.