try this one.
just pass for $_value an array with your table fieldname as your key
function constructUpdate( $_tbl_name, $_where, $_values )
{
$valstr = '';
$firstval = false;
if (is_array($_values)) {
foreach( $_values as $key=$val ) {
if
Thanks in advance for your help, and forgive me if this is me being
bone-headed. :-)
The following code works and accomplishes what I need it to do, but I
am wondering if there is a better way to accomplish the same task. I
have several tables of records and I need to count and then
Kevin Murphy asks:
The following code works and accomplishes what I need it to do, but I
am wondering if there is a better way to accomplish the same task. I
have several tables of records and I need to count and then display.
Even if I could just combine the first three queries (below) into
Actually the design is in the code below I need to display the
counts from all of those queries in a grid. Basically, its just a
summary of a bunch of information. Another way to look at it would be
a several lines that say something like this:
You have $data1_count NEW records in
$val = number_format($row['val'],2);
Bastien
From: Mark Bomgardner [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Php-Db php-db@lists.php.net
Subject: [PHP-DB] Converting to Decimal
Date: Wed, 28 Jun 2006 17:20:21 -0500
I am query a database and pulling some decimal values out of the
You could actually do (int) $var or use the sprintf(%d, $var);
-Original Message-
From: John Meyer [mailto:[EMAIL PROTECTED]
Sent: MiƩrcoles, 28 de Junio de 2006 06:04 p.m.
To: [EMAIL PROTECTED]
Cc: Php-Db
Subject: Re: [PHP-DB] Converting to Decimal
Mark Bomgardner wrote:
I am query
Are you just displaying the value with the decimal
places? If so, check out the function
number_format($var,2)
Skip
Miguel Guirao wrote:
You could actually do (int) $var or use the sprintf(%d, $var);
-Original Message-
From: John Meyer [mailto:[EMAIL PROTECTED]
Sent: MiƩrcoles, 28