php-windows Digest 30 Aug 2009 20:16:30 -0000 Issue 3683
Topics (messages 29561 through 29567):
Re: Getting a date to print out
29561 by: Sascha Meyer
29566 by: Jacob Kruger
Re: [PHP] Problem outputting MySQL Date field
29562 by: John Meyer
29563 by: Jim Lucas
29564 by: Keith Davis
29565 by: John Meyer
solved seconds after posting problem
29567 by: Fred Silsbee
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Hi John,
John Meyer schrieb:
is there any special trick to getting a MySQL date to print out? Simply
echoing it out doesn't seem to work.
could you provide some sample code what you try to achieve?
Regards,
Sascha
--- End Message ---
--- Begin Message ---
The Date() function is for formatting what they call timestamps, and
includes formatting etc.:
http://www.w3schools.com/php/php_date.asp
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
----- Original Message -----
From: "John Meyer" <johnme...@pueblocomputing.com>
To: <php-wind...@lists.php.net>
Sent: Saturday, August 29, 2009 12:17 AM
Subject: [PHP-WIN] Getting a date to print out
is there any special trick to getting a MySQL date to print out? Simply
echoing it out doesn't seem to work.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4378 (20090828) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4378 (20090828) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
--- End Message ---
--- Begin Message ---
Devendra Jadhav wrote:
No need to do anything special. It should display date as string. Can
you provide little more information or code snippet?
$tweettable .=
preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@',
'<a href="$1">$1</a>',$row["TWEET_TEXT"]) . "<br>" . "Sent at: " .
$rowqry["TWEET_CREATEDAT"];
$tweettable .= "<br>Sent Using: " . $row["TWEET_CREATEDBY"] .
"</td></tr>";
And I checked the database. The date is there.
--- End Message ---
--- Begin Message ---
John Meyer wrote:
Devendra Jadhav wrote:
No need to do anything special. It should display date as string. Can
you provide little more information or code snippet?
$tweettable .=
preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@',
'<a href="$1">$1</a>',$row["TWEET_TEXT"]) . "<br>" . "Sent at: " .
$rowqry["TWEET_CREATEDAT"];
$tweettable .= "<br>Sent Using: " . $row["TWEET_CREATEDBY"] .
"</td></tr>";
And I checked the database. The date is there.
Two things jump out.
1. TWEET_CREATEDAT is that suppose to be TWEET_CREATEDATE ??
2. two variables are accessed from the $row array, but the third is referenced from the $rowqry
array. This begs the question: Which is it? $row or $rowqry ?
Try this
$tweettable .= preg_replace(
'@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@',
'<a href="$1">$1</a>',
$row["TWEET_TEXT"]);
$tweettable .= '<br />Sent at: ' . $row["TWEET_CREATEDATE"];
$tweettable .= '<br />Sent Using: {$row['TWEET_CREATEDBY']}</td></tr>";
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--- End Message ---
--- Begin Message ---
But how are you getting the data from the db?
Does $rowqry represent a call using the mysql_fetch_array() function?
Sent from my magic iPhone,
Keith Davis 214-906-5183
On Aug 28, 2009, at 7:39 PM, "John Meyer"
<johnme...@pueblocomputing.com> wrote:
Devendra Jadhav wrote:
No need to do anything special. It should display date as string.
Can you provide little more information or code snippet?
$tweettable .= preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]
*(\?\S+)?)?)?)@', '<a href="$1">$1</a>',$row["TWEET_TEXT"]) .
"<br>" . "Sent at: " . $rowqry["TWEET_CREATEDAT"];
$tweettable .= "<br>Sent Using: " . $row["TWEET_CREATEDBY"] .
"</td></tr>";
And I checked the database. The date is there.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This message (including any attachments) may contain confidential or otherwise
privileged information and is intended only for the individual(s) to which it
is addressed. If you are not the named addressee you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately by e-mail
if you have received this e-mail by mistake and delete this e-mail from your
system. E-mail transmission cannot be guaranteed to be secured or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses. The sender therefore does not accept liability
for any errors or omissions in the contents of this message or that arise as a
result of e-mail transmission. If verification is required please request a
hard-copy version from the sender.
www.pridedallas.com
--- End Message ---
--- Begin Message ---
Keith Davis wrote:
But how are you getting the data from the db?
Does $rowqry represent a call using the mysql_fetch_array() function?
mysql_fetch_assoc()
--- End Message ---
--- Begin Message ---
IIS 5.1 properties->home directory->configuration
I added .php C:\PHP\phpisapi.dll GET,HEAD,POST,DEBUG
--- End Message ---