[PHP] Timestamps and strftime

2009-06-04 Thread John Comerford
Hi, I am having a problem trying to use a date that I take from a MySQL database. The field is defined as a timestamp in the database. I extract it using PDO and I am trying to use the value with strftime as follows: foreach ($stmt-fetchall(PDO::FETCH_ASSOC) as $row) { echo

Re: [PHP] Timestamps and strftime

2009-06-04 Thread John Comerford
Thanks Jonathan, Thats exactly what I needed. I appreciate the help, JC Mayer, Jonathan wrote: Off the top of my head, would strtotime work? ie strftime(%j,strtotime($row['UpdateDate'])) -Original Message- From: John Comerford [mailto:jo...@optionsystems.com.au] Sent: 04 June

[PHP] Pear DB

2008-07-10 Thread John Comerford
Hi Folks, I have just successfully lobbied for the company I work for to use PHP/MySQL for our next website. My Question is regarding DB abstraction . I know there is a Pear DB module, is this the best to use ? I have a vague memory of reading somewhere that there is a newer lib or

[PHP] PHPNews Vs phpns

2008-07-02 Thread John Comerford
I am looking at including news on a website I am putting together. From my google searches it seems the two main players are PHPNews and phpns. Are these the main open source news systems ? Is one considered better than the other ? Anyone got any real world experiences with either of these

Re: [PHP] Re: Log files

2008-07-02 Thread John Comerford
If you are logging errors, then maybe you should look at using a file instead of a database table. I have seen an instance where a system used a table for error logging and writing to the log table caused and error, you can guess where that left things. Shawn McKenzie wrote: Mark

[PHP] Restricting access to a file

2008-05-28 Thread John Comerford
Hi Folks, This may not be strictly a PHP question but there may be something in PHP to do what I want. I am in the process of putting together a pretty basic website using MySql and PHP on a third party host. One of the function is to allow known stockist download a catalogue (.pdf). I am

[PHP] Graphical Site Map

2008-04-30 Thread John Comerford
Hi Folks, Does anybody know of a product (php or otherwise) that enables the creation of a graphical site map ? I have had a shimmy around the web but just keep finding classes to create the .xml format site maps. TIA, JC -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Parameter

2008-03-12 Thread John Comerford
Hi Folks, I am thinking of putting together a class to handle passing parameters to a class. Basically when you define a class you would define your class to extend the parameter class. The parameter class would be JSON compliant so in the end when you call a class it you could pass the

Re: [PHP] avoid calling php script

2008-03-12 Thread John Comerford
May the get_Browser function could tell you if it's from the .swf ? http://us.php.net/manual/en/function.get-browser.php H u g o H i r a m wrote: Hello I have a swf that runs a PHP script that generates a XML, on the PHP is there any way to detect if the file is being called from the swf or

[PHP] Array Push question

2007-07-12 Thread John Comerford
Hi Folks, Is there a better way of doing the following: $Rows[] = array(); $currentRow = count($Rows) - 1; $Rows[$currentRow]['test'] = this is a test; Specifically I am wonder if I can avoid having to use 'count'. TIA, JC -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Array Push question

2007-07-12 Thread John Comerford
. Thanks for the replies, JC Jim Lucas wrote: John Comerford wrote: Hi Folks, Is there a better way of doing the following: $Rows[] = array(); $currentRow = count($Rows) - 1; $Rows[$currentRow]['test'] = this is a test; I imagine that you are doing other actions between the above three lines

Re: [PHP] System wide variable

2007-05-23 Thread John Comerford
How about a table using the mysql memory engine ? Darren Whitlen wrote: Hi, I have a PHP script that reads and updates either a small file or a mysql database. This script is called from several places every .5 seconds. I would like to move this file to a variable for extra speed as the

Re: [PHP] Cannot connect to an MySQL database using Named Pipes (resolved)

2007-05-16 Thread John Comerford
I got as reply on another forum which resolved this issue. The command should be: $mysqli = new mysqli(., $username,$password, $database,null,/tmp/mysql.sock); NB. host is a dot John Comerford wrote: Hi Folks, I have a database running on Window XP, that I want to disable network

[PHP] Cannot connect to an MySQL database using Named Pipes

2007-05-15 Thread John Comerford
Hi Folks, I have a database running on Window XP, that I want to disable network connections to and enable 'named pipes'. I am running MySQL 5.0.27 and my.ini looks like... [client] #password= your_password port= 3306 socket= /tmp/mysql.sock [mysqld] #port=

[PHP] Find a what class a variable is

2007-04-27 Thread John Comerford
Hi Folks, Is is possible to detect what class a variable is eg. $JC1 = new Button(); $JC2 = new TickBox(); Is it possible to find out what class $JC1 is ? TIA, JC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Alternative/Addition to using a CAPTCHA

2007-03-29 Thread John Comerford
I was reading the current tread on CAPTCHA and possible cracks and I thought maybe I'd throw this out to the group to see what you think. Recently I saw a forum where in order to post you first had to click on a div that was placed at a random location on the page, it read something like,

[PHP] Check a string does not contain invalid characters

2007-03-21 Thread John Comerford
Hi Folks, I am new to php. I want to accept a character string which I will use as a unique user id. I want to check the string to ensure the user has not typed characters that I consider to be invalid as part of a user id. I was thinking of doing something along the lines of: if

[PHP] _Construct question

2007-03-20 Thread John Comerford
Hi Folks, I am still pretty new to PHP and I have a question regarding classes and using _construct. Up until now I have been creating my classes as follows: class test1 { var $name; function test1($pName) { $this-name = $pName; } } So I when I create a new class I can assign 'name' by

[PHP] Log Lib Recommendation

2007-03-18 Thread John Comerford
Hi Folks, Could someone recommend a good library for error logging. What I am looking for is something that handles: 1) Error Log written to a DB (mysql) 2) Logging of PHP errors 3) Logging of MySQL errors 4) Logging of Custom errors/events 5) A log viewer would be nice but not really

Re: [PHP] needed Yahoo like window for db query.

2007-02-18 Thread John Comerford
You can use their JS Scripts, Check out: http://developer.yahoo.com/yui/ http://developer.yahoo.com/yui/container/ Chris Carter wrote: Need some help on getting some database result in a css popup like yahoo. The requirement is to open a div or a window similar to yahoo one. As you can see

Re: [PHP] CHMOD a file in windows server 2003

2007-01-11 Thread John Comerford
Check out the CACLS command HTH, JC Kencana wrote: Hi all, anybody knows how to CHMOD a file to 777 or 666 or etc. in windows server 2003? thank you Regards, Kencana -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Closing a connection to browser without exiting the script

2006-11-02 Thread John Comerford
You could also use an Ajax call from the main window to start the processing without opening a second window. HTH, John Ed Lazor wrote: Here's another idea: display your message in the original browser window, launch a new browser window for the processing script, have the window set