SQL query question

SQL query question

am 21.11.2006 00:52:27 von dan

Hi, I'm new to PHP so this might be a simple question to answer but I
just need a little help.

So basically I'm querying the database with this simple search SQL
statement:

$conn = db_connect();
$result = $conn->query( "SELECT name, url FROM table1 WHERE field1
LIKE'%$search%'");

where db_connect is just the connection to the database.

I want to use the name and url to fill up a table of all the search
results such as below:

echo "";

I was just wondering how to get the $result so I can use it to fill up
the table and what type of loop I should use. Thanks!

Re: SQL query question

am 21.11.2006 01:00:59 von dan

Oh yeah, and I'm using MySQL in case you were wondering.

Re: SQL query question

am 21.11.2006 01:22:15 von zac.carey

Dan wrote:
> Oh yeah, and I'm using MySQL in case you were wondering.

http://uk2.php.net/mysql_fetch_array