[thelist] PHP/MySQL Newbie question

Martin Kuplens-Ewart martin at takingitglobal.org
Tue May 21 10:18:01 CDT 2002


To grab data

mysql_query(//SQL STATEMENT HERE//)

To grab an array of data [multiple rows..]

With field names as indices:
mysql_fetch_assoc() <-- dreamweaver may put in mysql_fetch_array()

Unless you want to use numerical indices as well as associative, use
fetch_assoc, as it only grabs the fieldname-associated  array data....
'fetch_array grabs both fieldname/numerical ... So grabs all data twice.

You use the following functions:

mysql_connect()
mysql_db_select()

Etc.

http://www.php.net/mysql_connect

And

http://www.php.net/mysql_db_select

Will give you information on use, and point you to a ton of other mysql
functions. :)

Hth,

-m

---- original ----

"How does PHP see the connection to the MySQL database and associated
tables?"





More information about the thelist mailing list