Re: [PHP-DB] mySQL date query
what is the format of the date u are storing ? Chaitanya On Tue, Apr 13, 2010 at 11:50 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am trying to write a mySQL query on my stats table. I am trying to determine the number of records (users) during a 7 day period ending yesterday. I always to keep it current ... Yesterday will keep changing. In other words I want to know the number of users who accessed the web site during seven full days. This is the beginning of the query. The date column is date. SELECT count(`visits`) as users FROM `stats` WHERE `date` Thanks, Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mySQL date query
Ron Piggott wrote: I am trying to write a mySQL query on my stats table. I am trying to determine the number of records (users) during a 7 day period ending yesterday. I always to keep it current ... Yesterday will keep changing. In other words I want to know the number of users who accessed the web site during seven full days. This is the beginning of the query. The date column is date. SELECT count(`visits`) as users FROM `stats` WHERE `date` The mysql manual is a good place to start. http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-sub -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mySQL date query
It is in a 'date' column type -MM-DD what is the format of the date u are storing ? Chaitanya On Tue, Apr 13, 2010 at 11:50 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am trying to write a mySQL query on my stats table. I am trying to determine the number of records (users) during a 7 day period ending yesterday. I always to keep it current ... Yesterday will keep changing. In other words I want to know the number of users who accessed the web site during seven full days. This is the beginning of the query. The date column is date. SELECT count(`visits`) as users FROM `stats` WHERE `date` Thanks, Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mySQL date query
try this SELECT DATE_ADD('2008-01-02', INTERVAL -7 DAY); Chaitanya On Tue, Apr 13, 2010 at 12:01 PM, Ron Piggott ron.pigg...@actsministries.org wrote: It is in a 'date' column type -MM-DD what is the format of the date u are storing ? Chaitanya On Tue, Apr 13, 2010 at 11:50 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am trying to write a mySQL query on my stats table. I am trying to determine the number of records (users) during a 7 day period ending yesterday. I always to keep it current ... Yesterday will keep changing. In other words I want to know the number of users who accessed the web site during seven full days. This is the beginning of the query. The date column is date. SELECT count(`visits`) as users FROM `stats` WHERE `date` Thanks, Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Postgres - how to skip 'sequence' columns
On 4/13/10, Chris wrote: Gary . wrote: Is it possible to skip column(s) in the target table when using pg_copy_from? ... It seems not from looking at the php manual. You could use http://www.php.net/manual/en/function.pg-put-line.php instead. Yeah. I was hoping to use pg_copy_from to avoid looping over the array in php, but I can do that. Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Fatal error: Call to undefined function pq_query()
What the... What is causing this? I can use pg_connect without complaint, why does pq_query give this problem? PHP 5.3.1 FWIW. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Fatal error: Call to undefined function pq_query()
Are you sure you're not using q instead of g :) just to be sure, you can check if a function exists by using $boolExists = function_exists('any_function_name'); http://www.php.net/manual/en/function.function-exists.php On Tue, Apr 13, 2010 at 11:20 AM, Gary . php...@garydjones.name wrote: What the... What is causing this? I can use pg_connect without complaint, why does pq_query give this problem? PHP 5.3.1 FWIW. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Fatal error: Call to undefined function pq_query()
On Tue, Apr 13, 2010 at 10:40 AM, Firan Corneliu wrote: Are you sure you're not using q instead of g :) Err. My first thought was What a strange thing to ask. Then I looked... Thanks. I'd been looking at that for a good hour or so... *embarrassed* -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Online PHP-Mysql Meeting
so the topic is dead? -- Taygun ALBAN IT Manager Creativity Talent Information Technologies
Re: [PHP-DB] Online PHP-Mysql Meeting
well... i don't have idea and suddenly have busy in my work On Wed, Apr 14, 2010 at 6:43 AM, Taygun ALBAN taygun.al...@gmail.comwrote: so the topic is dead? -- Taygun ALBAN IT Manager Creativity Talent Information Technologies -- akan ada dimana mulut terkunci dan suara tak ada lagi.. saat itu gunakanlah HP untuk melakukan SMS!! - ini aliran bedul.. bukan aliran aneh. tertawa sebelum tertawa didepan RSJ..