[PHP] Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field

2009-08-31 Thread Devendra Jadhav
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 keithda...@pridedallas.comwrote:

 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 .= brSent 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




-- 
Devendra Jadhav


[PHP] Problem outputting MySQL Date field

2009-08-28 Thread 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: [PHP] Problem outputting MySQL Date field

2009-08-28 Thread 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+)?)?)?)@', 
'a href=$1$1/a',$row[TWEET_TEXT]) . br . Sent at:  . 
$rowqry[TWEET_CREATEDAT];
   $tweettable .= brSent Using:  . $row[TWEET_CREATEDBY] . 
/td/tr;


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

2009-08-28 Thread Jim Lucas

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 .= brSent 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field

2009-08-28 Thread 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  
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 .= brSent 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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-WIN] Re: [PHP] Problem outputting MySQL Date field

2009-08-28 Thread 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