Re: Get shipping problem continued!
| From: | Michael T. Babcock | Date: | Fri, 01 Nov 2002 13:54:07 +0000 |
| Subject: | Re: Get shipping problem continued! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122420@lists.php.net to get a copy of this message | ||
Steve Jackson wrote:
function get_shipping($shippingvar) { $conn = db_connect(); $query = mysql_query("SELECT MAX(receipt_id) from receipts"); $myrow = mysql_fetch_row($query); $shippingvar = $myrow["shipping"]; return $shippingvar;Check http://php.net/mysql_fetch_row ... specifically, mysql_fetch_row specifically is not mysql_fetch_array and the latter is probably what you want. You may also want some error checking in that function if you don't already have any. -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock