Created
November 9, 2011 21:31
-
-
Save compil3/1353120 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
for($i=0;$i<count($prod);++$i) | |
{ | |
$query = "INSERT INTO purchase_items (quant,pib,price,id) VALUES ({$quant[$i]},{$pib[$i]},{$ppu[$i]},NULL)"; | |
$query = "INSERT INTO purchases (orderno,,vendor,id) VALUES ('$pnumber','$vend',NULL)"; | |
$result = mysql_query($query); | |
if (!$result) die ("Database access failed: " . mysql_error()); | |
else { | |
echo "Created"; | |
} | |
//add each row to the database here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment