[PHP] Re: Any easy way to go from MySQL Dates to PHP dates?

2002-03-31 Thread Ernesto
Use strtotime(). $result = mysql_query("SELECT datefield FROM mytable"); $row = mysql_fetch_array($result); $datevar=strtotime($row['datefield']); echo date('m-d-Y', $datevar); Regards, "David Johansen" <[EMAIL PROTECTED]> wrote: > I was just wondering if there's any way to work with dates ret

[PHP] Re: Why?

2002-03-31 Thread Ernesto
Alberto Wagner wrote: > Why everyone uses $foo or $foobar as examples? > > > foo /foo/ 1. interj. Term of disgust. 2 [very common] Used very generally as a sample name for absolutely everything, esp. programs and files (esp. scratch files). 3. First on the list of metasyntactic variables used in

[PHP] Undefined variables

2002-03-30 Thread Ernesto
declare and initialize all variables, but I need my scripts to run as fast as they can (and I'm too lazy to check every variable before I use it, too :-) So... do I have any choice? Regards, Ernesto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Evaluating code

2002-03-06 Thread Ernesto
to a file and then including it, but I want to know if there's a better way. As I'm going to do this all the time, I prefer not to create temporary files (so I don't slow down everything). Any ideas? Thanks in advance, Ernesto -- PHP General Mailing List (http://www.php.net/) To

[PHP] How to format ODBC dates

2001-12-12 Thread Ernesto
Hi, Obviously this is somewhere in the FM, which I've (almost) read, but I can't find an answer to: How do I convert a string containing an ODBC date (-MM-DD HH:MM:SS) to a date variable, which I can format usging date()? Thanks in advance, Ernesto -- PHP General Mailing

[PHP] Strange bug

2001-12-05 Thread Ernesto
ning WebSite Pro 2.4 and PHP 4.0.6 (one Windows 2000 Advanced Server and the other Windows XP Pro). Is this a PHP bug, a WebSite bug or my code? I don't think I screwed something up because I'm not playing with the headers here. Any ideas? Regards, Ernesto -- PHP General Mailing

[PHP] Is this the expected behavior?

2001-12-04 Thread Ernesto
e many nested inclusions (not recursion, just including a file in an included file wich at it's time is included in another, etc.). Regards, Ernesto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] Re: $QUERY_STRING

2001-11-13 Thread Ernesto
nction to import the query string from apache ambient. > This is not a bug, maybe the index.php?1 isn't standard at all. > "Ernesto" <[EMAIL PROTECTED]> ha scritto nel messaggio > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >>Hi, >> &

[PHP] $QUERY_STRING

2001-11-13 Thread Ernesto
uot;, $HTTP_GET_VARS['s'] is 1, but I need the raw query string because it's something like "index.php?1". Is this a known bug on PHP/WinXP? Regards, Ernesto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] Serial Port Programing

2001-11-13 Thread Ernesto
Brian C. Doyle wrote: > Hello all, > > Does PHP have the ability to control a serial port? I see we can use > the Printer but that was All I saw. > > > I guess you may fopen COM1: or COM2: You should be able to fopen PRN: or LPT1: as well. -- PHP General Mailing List (http://www.php.ne

[PHP] Server redirection

2001-11-09 Thread Ernesto
Hi there... newbie here! How do I do server-side redirection? I want to redirect the user to another URL without using javascript. Regards, Ernesto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

[PHP] odbc_free_result

2001-11-09 Thread Ernesto
esult($ex); I guess both resources are freed, but I just want to make sure because I do this all the time (because the old code I'm porting does it (because it's ok to do it in _that_ language) (and I'm too lazy to rework it)). Thanks in advance. Regards, Ernesto -- PHP Gener