Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199807

Re: [PHP3] Search in a table From: Mark Polsen (mpolsen <email protected>)
Date: 07/16/98

> Lars Göransson wrote:
>
> > Now can i connect to my database , thanks to all:)
> >
> > But now to next problem. I want to search in my database/table. Is there
> > a scrit availble for that.
>
> Try something like this:
> msql_connect("name_of_host");
>  <email protected>("name_of_database");
> $table = "table_name";
>
> $select_string = "select item1, item2, item3 from $table where item1 =
> '$something'";
> $success = msql_query($select_string);
>
> item1, item2 and item3 are the names of the fields and $something is a string
> you would like to match
> in item1.
>
> Good Luck,
> Mark

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive: http://www.tryc.on.ca/php3.html