Problem outputting MySQL Date field
Problem outputting MySQL Date field
am 28.08.2009 16:33:14 von John Meyer
Is there anything special I have to do to output a mysql date field as
text? When I try to output it nothing appears on the web page.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem outputting MySQL Date field
am 29.08.2009 02:37:12 von John Meyer
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 +)?)?)?)@',
'',$row["TWEET_TEXT"]) . "
" . "Sent at: " .
$rowqry["TWEET_CREATEDAT"];
$tweettable .= "
Sent Using: " . $row["TWEET_CREATEDBY"] .
"";
And I checked the database. The date is there.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem outputting MySQL Date field
am 29.08.2009 02:37:12 von John Meyer
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 +)?)?)?)@',
'',$row["TWEET_TEXT"]) . "
" . "Sent at: " .
$rowqry["TWEET_CREATEDAT"];
$tweettable .= "
Sent Using: " . $row["TWEET_CREATEDBY"] .
"";
And I checked the database. The date is there.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem outputting MySQL Date field
am 29.08.2009 04:57:53 von List Manager
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 +)?)?)?)@',
> '',$row["TWEET_TEXT"]) . "
" . "Sent at: " .
> $rowqry["TWEET_CREATEDAT"];
> $tweettable .= "
Sent Using: " . $row["TWEET_CREATEDBY"] .
> "";
>
> 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+)?)?)?)@',
'',
$row["TWEET_TEXT"]);
$tweettable .= '
Sent at: ' . $row["TWEET_CREATEDATE"];
$tweettable .= '
Sent Using: {$row['TWEET_CREATEDBY']}";
--
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem outputting MySQL Date field
am 29.08.2009 04:57:53 von List Manager
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 +)?)?)?)@',
> '',$row["TWEET_TEXT"]) . "
" . "Sent at: " .
> $rowqry["TWEET_CREATEDAT"];
> $tweettable .= "
Sent Using: " . $row["TWEET_CREATEDBY"] .
> "";
>
> 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+)?)?)?)@',
'',
$row["TWEET_TEXT"]);
$tweettable .= '
Sent at: ' . $row["TWEET_CREATEDATE"];
$tweettable .= '
Sent Using: {$row['TWEET_CREATEDBY']}";
--
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field
am 29.08.2009 04:58:42 von Keith Davis
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" =20
wrote:
> Devendra Jadhav wrote:
>> No need to do anything special. It should display date as string. =20
>> Can you provide little more information or code snippet?
> $tweettable .=3D =
preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]=20
> *(\?\S+)?)?)?)@', '',$row["TWEET_TEXT"]) . =20
> "
" . "Sent at: " . $rowqry["TWEET_CREATEDAT"];
> $tweettable .=3D "
Sent Using: " . $row["TWEET_CREATEDBY"] . =
> "";
>
> And I checked the database. The date is there.
>
> --=20
> 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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field
am 29.08.2009 04:58:42 von Keith Davis
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" =20
wrote:
> Devendra Jadhav wrote:
>> No need to do anything special. It should display date as string. =20
>> Can you provide little more information or code snippet?
> $tweettable .=3D =
preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]=20
> *(\?\S+)?)?)?)@', '',$row["TWEET_TEXT"]) . =20
> "
" . "Sent at: " . $rowqry["TWEET_CREATEDAT"];
> $tweettable .=3D "
Sent Using: " . $row["TWEET_CREATEDBY"] . =
> "";
>
> And I checked the database. The date is there.
>
> --=20
> 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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field
am 29.08.2009 05:49:18 von John Meyer
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()
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field
am 29.08.2009 05:49:18 von John Meyer
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()
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field
am 31.08.2009 09:13:17 von Devendra Jadhav
--00c09f8a4fe19a800b04726ac46f
Content-Type: text/plain; charset=ISO-8859-1
At the beginning of the code add following lines
error_reporting(E_ALL);
ini_set('display_error',1);
On Sat, Aug 29, 2009 at 8:28 AM, Keith Davis wrote:
> 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"
> 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 +)?)?)?)@', '
>> href="$1">$1',$row["TWEET_TEXT"]) . "
" . "Sent at: " .
>> $rowqry["TWEET_CREATEDAT"];
>> $tweettable .= "
Sent Using: " . $row["TWEET_CREATEDBY"] .
>> "";
>>
>> 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
>
>
--
Devendra Jadhav
--00c09f8a4fe19a800b04726ac46f--
Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field
am 31.08.2009 09:13:17 von Devendra Jadhav
--00c09f8a4fe19a800b04726ac46f
Content-Type: text/plain; charset=ISO-8859-1
At the beginning of the code add following lines
error_reporting(E_ALL);
ini_set('display_error',1);
On Sat, Aug 29, 2009 at 8:28 AM, Keith Davis wrote:
> 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"
> 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 +)?)?)?)@', '
>> href="$1">$1',$row["TWEET_TEXT"]) . "
" . "Sent at: " .
>> $rowqry["TWEET_CREATEDAT"];
>> $tweettable .= "
Sent Using: " . $row["TWEET_CREATEDBY"] .
>> "";
>>
>> 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
>
>
--
Devendra Jadhav
--00c09f8a4fe19a800b04726ac46f--