php-general Digest 12 Jul 2008 21:00:56 -0000 Issue 5565

2008-07-12 Thread php-general-digest-help
php-general Digest 12 Jul 2008 21:00:56 - Issue 5565 Topics (messages 276683 through 276708): Most popular per month 276683 by: Ryan S IPv6 validation 276684 by: Yeti 276685 by: Kevin Waterson 276686 by: Bernhard Kohl 276690 by: Eric Butera

[PHP] case and accent - insensitive regular expression?

2008-07-12 Thread Giulio Mastrosanti
Hi, I have a php page that asks user for a key ( or a list of keys ) and then shows a list of items matching the query. every item in the list shows its data, and the list of keys it has ( a list of comma-separated words ) I would like to higlight, in the list of keys shown for every

[PHP] Most popular per month

2008-07-12 Thread Ryan S
Hey! Thanks for replying! snip .. . $perc50=(img50 int)/$total; You can do it per day, per month, per year, per 28 days, per PMS cycle, per anything you want provided you have the data to do it. /snip :) this is the part where i am a bit confused actually, can you give me one or two

[PHP] IPv6 validation

2008-07-12 Thread Yeti
Hello community, I have been working with alot of IPv6 lately. Now i was wondering of what there might be the best way to validate an IPv6 address. Couldn't think of any working regexp, since even ::1 or :: is valid (localhost), so i tried it the following way: ?php //RFC 4291

Re: [PHP] IPv6 validation

2008-07-12 Thread Kevin Waterson
This one time, at band camp, Yeti [EMAIL PROTECTED] wrote: Now i was wondering of what there might be the best way to validate an IPv6 address. from this url.. http://phpro.org/tutorials/Filtering-Data-with-PHP.html#9 ?php /*** an IP address ***/ $ip =

Re: [PHP] IPv6 validation

2008-07-12 Thread Bernhard Kohl
Doesnt filter_var() require PHP5+ ? I have quite some systems still running 4.4.8. On 7/12/08, Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, Yeti [EMAIL PROTECTED] wrote: Now i was wondering of what there might be the best way to validate an IPv6 address. from

Re: [PHP] OT - RE: [PHP] scalable web gallery

2008-07-12 Thread David Giragosian
Todd Boyd recently offered: Haven't taken a distributed computing class just yet, but I've still got a bit until I graduate, and these elective credits are burning a hole in my pocket... The cost of public colleges and universities, as well as community colleges, are truly astounding these

Re: [PHP] case and accent - insensitive regular expression?

2008-07-12 Thread tedd
At 9:36 AM +0200 7/12/08, Giulio Mastrosanti wrote: Hi, I have a php page that asks user for a key ( or a list of keys ) and then shows a list of items matching the query. every item in the list shows its data, and the list of keys it has ( a list of comma-separated words ) I would like

Re: [PHP] OT - RE: [PHP] scalable web gallery

2008-07-12 Thread tedd
At 9:13 AM -0500 7/12/08, David Giragosian wrote: Todd Boyd recently offered: Haven't taken a distributed computing class just yet, but I've still got a bit until I graduate, and these elective credits are burning a hole in my pocket... The cost of public colleges and universities, as

Re: [PHP] IPv6 validation

2008-07-12 Thread Eric Butera
On Sat, Jul 12, 2008 at 9:13 AM, Bernhard Kohl [EMAIL PROTECTED] wrote: Doesnt filter_var() require PHP5+ ? I have quite some systems still running 4.4.8. On 7/12/08, Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, Yeti [EMAIL PROTECTED] wrote: Now i was wondering of

Re: [PHP] IPv6 validation

2008-07-12 Thread Yeti
It will still take some time until every provider has PHP5 running, at least where I am from. I have many customers who want me to get their sites running on some cheap webspace they got along with their internet connection. Then you have to tell them it won't work because of some problem with the

Re: [PHP] OT - RE: [PHP] scalable web gallery

2008-07-12 Thread David Giragosian
On 7/12/08, tedd [EMAIL PROTECTED] wrote: At 9:13 AM -0500 7/12/08, David Giragosian wrote: Todd Boyd recently offered: Haven't taken a distributed computing class just yet, but I've still got a bit until I graduate, and these elective credits are burning a hole in my pocket... The

[PHP] Passing arguments as they are received to another function

2008-07-12 Thread Luigi Perroti
Hello, I'm trying to implement a few simple wrappers for some PHP functions. Here's an example of what I'm trying to do: function myWrapper() { return defaultPhpFunction(func_get_args()); } The example above is broken since I'm just passing an array to the original function. The only way

Re: [PHP] Passing arguments as they are received to another function

2008-07-12 Thread James Dempster
You might want to take a look at http://php.net/manual/en/function.call-user-func-array.php On Sat, Jul 12, 2008 at 4:57 PM, Luigi Perroti [EMAIL PROTECTED] wrote: Hello, I'm trying to implement a few simple wrappers for some PHP functions. Here's an example of what I'm trying to do:

Re: [PHP] OT - RE: [PHP] scalable web gallery

2008-07-12 Thread Daniel Brown
On Sat, Jul 12, 2008 at 11:36 AM, David Giragosian [EMAIL PROTECTED] wrote: We had an article in our local paper yesterday about the guy that made and 'starred' in the video that Daniel posted about here a couple of weeks ago (Matt of 'Where in the World is Matt', fame). That was actually

Re: [PHP] scalable web gallery

2008-07-12 Thread Daniel Brown
On Fri, Jul 11, 2008 at 10:02 PM, tedd [EMAIL PROTECTED] wrote: For example, tedd.gif would compute to 4, whereas Rob.gif would be a meager 3, and Daniel.gif would be a six (which is probably over-rated for him anyway). :-) Hope you didn't break a hip while making yourself laugh there,

Re: [PHP] OT - RE: [PHP] scalable web gallery

2008-07-12 Thread David Giragosian
On 7/12/08, Daniel Brown [EMAIL PROTECTED] wrote: On Sat, Jul 12, 2008 at 11:36 AM, David Giragosian [EMAIL PROTECTED] wrote: We had an article in our local paper yesterday about the guy that made and 'starred' in the video that Daniel posted about here a couple of weeks ago (Matt of

Re: [PHP] Passing arguments as they are received to another function

2008-07-12 Thread Luigi Perroti
On Sat, Jul 12, 2008 at 6:00 PM, James Dempster wrote: You might want to take a look at http://php.net/manual/en/function.call-user-func-array.php Thank you very much for your suggestion. I've looked into it but I guess this doesn't work with what I'm trying to do, although what you

Re: [PHP] Passing arguments as they are received to another function

2008-07-12 Thread James Dempster
On the line where you have self::$statement-call_user_func_array(array('PDOStatement','bindParam'),func_get_args()); try this call_user_func_array(array(self::$statement,'bindParam'),func_get_args()); see if that works...? On Sat, Jul 12, 2008 at 5:36 PM, Luigi Perroti [EMAIL PROTECTED] wrote:

Re: [PHP] Passing arguments as they are received to another function

2008-07-12 Thread Luigi Perroti
On Sat, Jul 12, 2008 at 6:42 PM, James Dempster [EMAIL PROTECTED] wrote: On the line where you have self::$statement-call_user_func_array(array('PDOStatement','bindParam'),func_get_args()); try this call_user_func_array(array(self::$statement,'bindParam'),func_get_args()); see if that

Re: [PHP] IPv6 validation

2008-07-12 Thread Eric Butera
On Sat, Jul 12, 2008 at 11:24 AM, Yeti [EMAIL PROTECTED] wrote: It will still take some time until every provider has PHP5 running, at least where I am from. I have many customers who want me to get their sites running on some cheap webspace they got along with their internet connection. Then

Re: [PHP] OT - RE: [PHP] scalable web gallery

2008-07-12 Thread Robert Cummings
On Sat, 2008-07-12 at 10:43 -0400, tedd wrote: At 9:13 AM -0500 7/12/08, David Giragosian wrote: Todd Boyd recently offered: Haven't taken a distributed computing class just yet, but I've still got a bit until I graduate, and these elective credits are burning a hole in my pocket...

Re: [PHP] scalable web gallery

2008-07-12 Thread Robert Cummings
On Sat, 2008-07-12 at 12:03 -0400, Daniel Brown wrote: On Fri, Jul 11, 2008 at 10:02 PM, tedd [EMAIL PROTECTED] wrote: For example, tedd.gif would compute to 4, whereas Rob.gif would be a meager 3, and Daniel.gif would be a six (which is probably over-rated for him anyway). :-)

Re: [PHP] scalable web gallery

2008-07-12 Thread tedd
At 12:03 PM -0400 7/12/08, Daniel Brown wrote: On Fri, Jul 11, 2008 at 10:02 PM, tedd [EMAIL PROTECTED] wrote: For example, tedd.gif would compute to 4, whereas Rob.gif would be a meager 3, and Daniel.gif would be a six (which is probably over-rated for him anyway). :-) Hope you

Re: [PHP] scalable web gallery

2008-07-12 Thread Robert Cummings
On Sat, 2008-07-12 at 14:37 -0400, tedd wrote: At 12:03 PM -0400 7/12/08, Daniel Brown wrote: On Fri, Jul 11, 2008 at 10:02 PM, tedd [EMAIL PROTECTED] wrote: For example, tedd.gif would compute to 4, whereas Rob.gif would be a meager 3, and Daniel.gif would be a six (which is probably

Re: [PHP] scalable web gallery

2008-07-12 Thread Daniel Brown
On Sat, Jul 12, 2008 at 2:37 PM, tedd [EMAIL PROTECTED] wrote: Hey, let's knock off that old shit, newlywed ! Just because you finally got laid doesn't mean you can beat me in memory loss. :-) That's lei'd, sir. -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo.

Re: [PHP] OT - RE: [PHP] scalable web gallery

2008-07-12 Thread tedd
At 2:35 PM -0400 7/12/08, Robert Cummings wrote: On Sat, 2008-07-12 at 10:43 -0400, tedd wrote: Yes, but college degrees are the bill of goods we've been sold. We are lead to believe that if our children (and us) go to colleges and get that sheepskin then everything will be great for the

Re: [PHP] IPv6 validation

2008-07-12 Thread Kevin Waterson
This one time, at band camp, Yeti [EMAIL PROTECTED] wrote: It will still take some time until every provider has PHP5 running, at least where I am from. I have many customers who want me to get their sites running on some cheap webspace they got along with their internet connection. Then you

Re: [PHP] IPv6 validation

2008-07-12 Thread Robert Cummings
On Sun, 2008-07-13 at 07:02 +1000, Kevin Waterson wrote: This one time, at band camp, Yeti [EMAIL PROTECTED] wrote: It will still take some time until every provider has PHP5 running, at least where I am from. I have many customers who want me to get their sites running on some cheap

Re: [PHP] Most popular per month

2008-07-12 Thread Wolf
snip .. . $perc50=(img50 int)/$total; You can do it per day, per month, per year, per 28 days, per PMS cycle, per anything you want provided you have the data to do it. /snip :) this is the part where i am a bit confused actually, can you give me one or two examples and i'll work from there?

[PHP] PDO Question. Number of rows returned

2008-07-12 Thread Stephen
I am switching to PDO and can't find an equivalent to mysql_num_rows. Am I missing something silly? Or is there a change of thinking needed for PDO? How should I determine how many rows a query returned? Thanks Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Most popular per month

2008-07-12 Thread Brady Mitchell
On Jul 11, 2008, at 555PM, Ryan S wrote: before the next days counter starts this data is stored in a table which has a simple structure like this img_id1 int,img_id2 int (etc till img_id10) That sounds like a painful db structure to deal with if you want to add more images in the

[PHP] Saving loading time at counting rows

2008-07-12 Thread Joep Roebroek
I had this question, which I didn't really know where to ask, so I thought to begin at this mailing list. Very basicly said, I count the rows of a table which had approx 5 or more rows. The problem is, there is a notable difference in loading time with other pages. Is there a technique to

Re: [PHP] Saving loading time at counting rows

2008-07-12 Thread tedd
At 2:26 AM +0200 7/13/08, Joep Roebroek wrote: I had this question, which I didn't really know where to ask, so I thought to begin at this mailing list. Very basicly said, I count the rows of a table which had approx 5 or more rows. The problem is, there is a notable difference in loading

Re: [PHP] Saving loading time at counting rows

2008-07-12 Thread Robert Cummings
On Sat, 2008-07-12 at 23:22 -0400, tedd wrote: At 2:26 AM +0200 7/13/08, Joep Roebroek wrote: I had this question, which I didn't really know where to ask, so I thought to begin at this mailing list. Very basicly said, I count the rows of a table which had approx 5 or more rows. You

Re: [PHP] PDO Question. Number of rows returned

2008-07-12 Thread Kevin Waterson
This one time, at band camp, Stephen [EMAIL PROTECTED] wrote: I am switching to PDO and can't find an equivalent to mysql_num_rows. Am I missing something silly? Or is there a change of thinking needed for PDO? How should I determine how many rows a query returned? PDO returns an