Re: Re: [PHP-GTK] date_format in mysql wit h GTK?!?

From: Date: Mon, 22 Oct 2001 19:13:40 +0000
Subject: Re: Re: [PHP-GTK] date_format in mysql wit h GTK?!?
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-367@lists.php.net to get a copy of this message
The following code is relevant to my question, my date_format() function is not working!: $sql= "SELECT DISTINCT elist_calc_apc.certnum, elist_calc_apc.memcode, elist_calc_apc.last, elist_calc_apc.first, elist_calc_apc.addrone, elist_calc_apc.city, elist_calc_apc.state, elist_calc_apc.zip, elist_calc_apc.pcpnum, elist_calc_apc.proveffdt, elist_calc_apc.ezpcpid, elist_calc_apc.ipa, elist_calc_apc.mi, elist_calc_apc.plancode, date_format(elist_calc_apc.bdate, '%Y-%m-%d'), elist_calc_apc.actvcode, elist_calc_apc.changedt FROM elist_calc_apc WHERE elist_calc_apc.ipa = 'GSG' AND elist_calc_apc.actvcode != '01' AND elist_calc_apc.actvcode != '08' LIMIT 20"; $result = mysql_db_query($db, $sql); $chkcount = mysql_num_rows($result) or die ("couldnt count rows returned!"); $i=0; $i=(int)$i; while($row=mysql_fetch_array($result)) { $clist->freeze(); $certnum=$row["certnum"]; $memcode=$row["memcode"]; $lname=$row["last"]; $fname=$row["first"]; $addr1=$row["addrone"]; $city=$row["city"]; $state=$row["state"]; $zip=$row["zip"]; $pcpnum=$row["pcpnum"]; $proveffdt=$row["proveffdt"]; $ezpcpid=$row["ezpcpid"]; $selipa=$row["ipa"]; $mi=$row["mi"]; $plancode=$row["plancode"]; $bdate= $row["bdate"]; $actvcode=$row["actvcode"]; $changedt=$row["changedt"]; $membid = "$certnum$memcode"; $return[] .= $membid; $return[] .= $lname; $return[] .= $fname; $return[] .= $mi; $return[] .= $birth; $return[] .= $certnum; $return[] .= $plancode; $return[] .= $proveffdt; $return[] .= $ezpcpid; $return[] .= $proveffdt; $rowfill = $clist->append($return); $style0 = $clist->style; $style0 = $style0->copy(); $style0->font = gdk::font_load ("-*-verdana-small-*-*-*-*-120-*-*-*-*-*-*"); $clist->thaw(); unset($return); $i++; -----Original message----- From: "MarkusFischer" <mfischer@guru.josefine.at> To: "PQAdministrator" <pqadmin@physicianquest.net> Cc: "PHP-GTK" <php-gtk-general@lists.php.net> Date: 10/18/2001(Thu)23:13 Subject: Re: [PHP-GTK] date_format in mysql with GTK?!? On Thu, Oct 18, 2001 at 09:38:07PM -0800, PQ Administrator wrote : > Im running a MySQL query which uses the date_format() statement > for a few queries. When i issue date_format(, > '%Y-%m-%d') it formats it correctly except when i display the > date in a CList, it ommits the "-" seperator for the date... > Can i not display a date in the format of Y-m-D or Y/M/D within > a CList or GTK?!?! You can. Have you tried adding fixed strings with dashes in it? E.g. $list->append(array('2001-08-11'); works pretty fine on my system. Post the relevant parts of the code if you can't find the problem. - Markus Troy McComas Networks/System Admin. & Developer PhysicianQuest.com admin@physicianquest.com Office - (818)550-8777 or (626)282-0288 Cell- (626)255-9833 <!-- --> Powered by PhysicianQuest.com

« previous php.gtk.general (#367) next »