I asked some questions about displaying numerals and
dates recently and got some good feedback. Now I'm
ready to do it - but I'm doing something wrong.

Consider the table below, where the field "Numerals"
displays regular numerals (e.g. 2500) and "Dates"
displays dates.

Exactly how would I rewrite this so that commas are
inserted in numerals (2,500 vs 2500), and dates (e.g.
2004-12-28) are displayed like "December 28th, 2004,"
or "Dec. 28, 2004"?

<table class="sortable" id="tab2000">
<tr><th class="tabstate" colspan="8">Campaign
2000</th></tr>
<tr>

<td><?php foreach ($data as $r) { print
$r['Numerals']; } ?></td>

<td><?php foreach ($data as $r) {
print(date_format($r['Dates'])); } ?></td>

</tr>
</table>

Also, there's something really weird going on with my
numerals. I saved a Microsoft spreadsheet as a CSV
file, which I then imported into MySQL.

But many of the numerals were transformed to 32767 in
my database. Here's a sample line from the CSV file,
which illustrates that just one numeral is surrounded
by quotes:

921781,"472940",422768,13421,7358,5294

In this particular example, the last two numerals
display correctly in the database, but the other four
don't - including the numeral surrounded by quotes.

Any idea what's going on here? Thanks.


                
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to