PHP Query

admin

Administrator
Staff member
Php is new to me, but I am learning.

I just want to query certain items from a product database. Like the description,
cost, QOH, etc.

Here is what I have, but I'm a little lost.

<?

// connect to server
$mysql_link = mysql_connect() or die ("Problem connecting to DataBase");

// select the databse
$select = mysql_select_db("products", $mysql_link);

// get data from table
$result = mysql_query("SELECT part_num FROM products WHERE part_num =043011") or die ("Query failed");

echo $result;

?>



I know I'm missing something important, but what? Can someone tell me what codeing I need, to be able to pull data out from a database. Also, how I can specify the row and column, and the correct way to show the data or results of the query.
 
Back
Top