Created
March 23, 2014 21:06
-
-
Save kelso/9729836 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mysql_connect("localhost", "mysql_user", "mysql_password") or die("Could not connect: " . mysql_error()); | |
mysql_select_db("mydb"); | |
$result = mysql_query("SELECT price, product_id FROM product_attributes"); | |
while ($row = mysql_fetch_array($result, MYSQL_NUM)) { | |
echo "price: ".$row[0] | |
echo "product_id".$row[1] | |
} | |
mysql_free_result($result); // clean memory | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment