At 10/31/2002, you wrote:
function get_order_id_receipt($orderid, $shipping) { //Get order ID from DB to pass to receipt. $conn = db_connect(); $datequery = "select date from receipts where customerid = '10'"; $query = "select orderid from receipts where customerid = '10'"; $shippingquery = "select shipping from receipts where customerid = '10'"; $date_result = mysql_query($datequery); $date = mysql_result($date_result); $orderid_result = mysql_query($query); $orderid = mysql_result($orderid_result); $shipping_result = mysql_query($shippingquery); $shipping = mysql_result($shipping_result); return $orderid; return $shipping; }I get these errors echoed from mysql_error() Warning: Wrong parameter count for mysql_result() in order_fns.php on line 127 Warning: Wrong parameter count for mysql_result() in order_fns.php on line 129 Warning: Wrong parameter count for mysql_result() in order_fns.php on line 131 What does that mean?
Try
function get_order_id_receipt($orderid, $shipping)
{
//Get order ID from DB to pass to receipt.
$conn = db_connect();
$datequery = "select date from receipts where customerid = '10'";
$query = "select orderid from receipts where customerid = '10'";
$shippingquery = "select shipping from receipts where customerid =
'10'";
$date_result = mysql_query($datequery);
$date = mysql_result($date_result,0);
$orderid_result = mysql_query($query);
$orderid = mysql_result($orderid_result,0);
$shipping_result = mysql_query($shippingquery);
$shipping = mysql_result($shipping_result,0);
return $orderid;
return $shipping;
}
See http://fi2.php.net/manual/fi/function.mysql-result.php
But with mysql_result you'll get see one CELL only. Maybe you need to use something like
$dates = array();
while ($row = mysql_fetch_array( $date_result)) {
array_push($dates, $row["date"]);
}
return $dates;
-------------------------
Pekka Saarinen
http://photography-on-the.net
-------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php