|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: [PHP] Problem outputting MySQL Date fieldJohn 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 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: Re: [PHP] Problem outputting MySQL Date fieldBut 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" <johnmeyer@...> 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 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: Re: [PHP] Problem outputting MySQL Date fieldKeith 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 Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: Re: [PHP] Problem outputting MySQL Date fieldAt 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 <keithdavis@...>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" <johnmeyer@...> > 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 > > -- Devendra Jadhav |
| Free embeddable forum powered by Nabble | Forum Help |