[PHP-DB] Slow query

2008-07-23 Thread Steven Macintyre
Hi all, Below is the query we are getting a slow response on ... 2seconds ... with 4 records we were hoping to get it much quicker. Can someone advise if i can optimise this? SELECT s.movie_id, m.movie_name, movie_shortname, image_name, image_extension, m.trailerAvail FROM sessions AS s LEFT

Re: [PHP-DB] Slow query

2008-07-23 Thread Chris
Steven Macintyre wrote: Hi all, Below is the query we are getting a slow response on ... 2seconds ... with 4 records we were hoping to get it much quicker. Can someone advise if i can optimise this? SELECT s.movie_id, m.movie_name, movie_shortname, image_name, image_extension,

[PHP-DB] array_filter problem with 0's

2008-07-23 Thread Chris
I have a string $num = 012 4290-2008; I made it an array with I tried to get the integers from the string like this. $value = str_split($num); $value_new = array_filter($value, return_int); function return_int($value){ if(ctype_digit($value)){ echo $value;

Re: [PHP-DB] array_filter problem with 0's

2008-07-23 Thread Sanjay Mantoor
Hi Chris, You need to return true or false from return_int function. As 0 will be treated as false it will not be returned to filtered result array. Change the function return_int like below, then you should be able to get proper array. function return_int($value){

Re: [PHP-DB] Slow query

2008-07-23 Thread Bastien Koert
On Wed, Jul 23, 2008 at 4:48 AM, Chris [EMAIL PROTECTED] wrote: Steven Macintyre wrote: Hi all, Below is the query we are getting a slow response on ... 2seconds ... with 4 records we were hoping to get it much quicker. Can someone advise if i can optimise this? SELECT

[PHP-DB] mejora

2008-07-23 Thread José A Bermúdez
Cris: Hi. The improvement to your function, proposed by Sanjay Mantoor, works excellent. There´s no need to find any other way. Bermúdez. ?php //here we use the function you proposed, improved by Sanjay Mantoor: function return_int($value){ if

[PHP-DB] Mysql logs

2008-07-23 Thread Manoj Singh
Hi All, Please help me to set the logging on in mysql. I am using the following command when starting mysql: service mysqld start --log=/usr/local/ But logging is not maintained through this command. Best Regards, Manoj Kumar Singh

Re: [PHP-DB] Mysql logs

2008-07-23 Thread Micah Gersten
You have to edit your my.cnf file. Here's a link to the docs: http://dev.mysql.com/doc/refman/5.0/en/log-files.html Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Manoj Singh wrote: Hi All, Please help me to set the logging on in mysql. I am using the

Re: [PHP-DB] Mysql logs

2008-07-23 Thread Manoj Singh
Hi Micah, Thanks for help. Best Regards, Manoj Kumar Singh On Thu, Jul 24, 2008 at 11:02 AM, Micah Gersten [EMAIL PROTECTED] wrote: You have to edit your my.cnf file. Here's a link to the docs: http://dev.mysql.com/doc/refman/5.0/en/log-files.html Thank you, Micah Gersten onShore