[plug] Php again

Chris Darby chris at mnet.com.au
Fri Aug 18 12:39:35 WST 2000


Sorry to bother the list again, but i have yet another problem, im getting a
parse error on line 4 of the following code

Ive been looking at this code for 30 minutes now and i cannot see what is
rong with the query.

Can someone help...its been a long day

<?
	include("modules/orders/checkstatus.i");

	$makeprice = "select * from productprice where code = '$code'";
	$execprice = mysql_query($makeprice, $connect);
	$resultprice = mysql_fetch_array($execprice);
	$price = $resultprice["price"];

	$addproduct = "insert into orderitem(ordernum,code,price,qty) values
($neworder,'$product',$price,$qty);

	mysql_query($addproduct, $connect);

	$checkupdate = "select * from orderitem where ordernum = $neworder and code
= '$code'";
	$execupdate = mysql_query($checkupdate, $connect);

	$resultupdate = mysql_num_rows($execupdate);

	if ($resultupdate == 0) {
		echo("Item no added to order");
	} else if ($resultupdate == 1) {
		echo("Item added to order successfully");
	}

?>




More information about the plug mailing list