RE: [PHP] Custom function for inserting values into MySQL

2009-11-04 Thread Daevid Vincent
> -Original Message- > From: Shawn McKenzie [mailto:nos...@mckenzies.net] > Sent: Wednesday, November 04, 2009 6:20 AM > To: Allen McCabe; PHP General > Subject: Re: [PHP] Custom function for inserting values into MySQL > > In your example, I would name my form inputs similar to name > ="

Re: [PHP] OO method inside a variable

2009-11-04 Thread Robert Cummings
simone.na...@ptvonline.it wrote: Hi everybody, i'm trying to apply a method to an object getting its name from a variable, that i obtain parsing an XML file. For example: $object = new Class; $method = "row()"; #I'm getting this from the XML parser $object->$method; #I've an error here... O

Re: [PHP] OO method inside a variable

2009-11-04 Thread Eddie Drapkin
On Wed, Nov 4, 2009 at 4:36 PM, wrote: > Hi everybody, > i'm trying to apply a method to an object getting its name from a variable, > that i obtain parsing an XML file. > > For example: > > $object = new Class; > $method = "row()"; #I'm getting this from the XML parser > $object->$method; #I've

[PHP] OO method inside a variable

2009-11-04 Thread simone.nanni
Hi everybody, i'm trying to apply a method to an object getting its name from a variable, that i obtain parsing an XML file. For example: $object = new Class; $method = "row()"; #I'm getting this from the XML parser $object->$method; #I've an error here... Obviously the method inside the cla

[PHP] Ottawa, Canada - PHP Developers

2009-11-04 Thread Robert Cummings
Hi All, Any Ottawa based PHP developers out there that freelance / contract? Nothing to offer right now but we are creating a list of potential contacts related to open source within a Canadian Federal Government context... especially as relates to open-source and PHP. While telecommute would

Re: [PHP] Need unrounded precision

2009-11-04 Thread Nathan Rixham
Matthew McKay wrote: Kim Madsen wrote: Hello Andre Dubuc wrote on 2010-01-02 02:20: Hi, I need to extract the first digit after the decimal point from a number such as 28.56018, which should be '5'. Since no one came up with the simple solution: $num = "28.56018"; ereg("^[0-9]+\.([0-9]){1

Re: [PHP] Custom function for inserting values into MySQL

2009-11-04 Thread Nathan Rixham
Shawn McKenzie wrote: Allen McCabe wrote: Do you see any major hangups or screwups on first glance? And is my fear of trying this out on my database unfounded? Does this even seem that useful? in all honesty.. loads of screwups - don't try it out on your database & ultimately if it isn't re

Re: [PHP] Need unrounded precision

2009-11-04 Thread Matthew McKay
Kim Madsen wrote: Hello Andre Dubuc wrote on 2010-01-02 02:20: Hi, I need to extract the first digit after the decimal point from a number such as 28.56018, which should be '5'. Since no one came up with the simple solution: $num = "28.56018"; ereg("^[0-9]+\.([0-9]){1}", trim($num), $regs)

[PHP] Re: Using remote include config file and class in a local file

2009-11-04 Thread Nathan Rixham
Shawn McKenzie wrote: Anton Heuschen wrote: Question is wrt to including a config file on an external server in a local include Lets say that on 127.0.0.1 I have test.php with include http://200.200.1.1/Folder/Config.php $obj = new RemoteClass() do stuff and on server 200.200.1.1 I have my

Re: [PHP] Re: PHP String convention

2009-11-04 Thread Lars Torben Wilson
2009/11/4 Nathan Rixham : > Nick Cooper wrote: >> >> Hi, >> >> I was just wondering what the difference/advantage of these two >> methods of writing a string are: >> >> 1) $string = "foo{$bar}"; >> >> 2) $string = 'foo'.$bar; > > 1) breaks PHPUnit when used in classes (need to bug report that) > 2)

Re: [PHP] It's not behaving. Error reporting, that is

2009-11-04 Thread Nathan Rixham
Ashley Sheridan wrote: On Wed, 2009-11-04 at 08:52 -0600, Philip Thompson wrote: On Nov 3, 2009, at 11:24 AM, Kim Madsen wrote: Hi Philip Try to post a link to a page, that prints phpinfo() -- Kind regards Kim Emax Philip Thompson wrote on 2009-11-03 17:11: Hi all. This seems like a tr

Re: [PHP] PHP String convention

2009-11-04 Thread Lars Torben Wilson
2009/10/28 Warren Vail : > The curly braces look like something from the smarty template engine. > > Warren Vail Odd. I always thought the curly braces in the Smarty engine looked like something from PHP. :) Torben > -Original Message- > From: Kim Madsen [mailto:php@emax.dk] > Sent:

Re: [PHP] It's not behaving. Error reporting, that is

2009-11-04 Thread Ashley Sheridan
On Wed, 2009-11-04 at 08:52 -0600, Philip Thompson wrote: > On Nov 3, 2009, at 11:24 AM, Kim Madsen wrote: > > > Hi Philip > > > > Try to post a link to a page, that prints phpinfo() > > > > -- > > Kind regards > > Kim Emax > > > > Philip Thompson wrote on 2009-11-03 17:11: > >> Hi all. > >> Th

Re: [PHP] It's not behaving. Error reporting, that is

2009-11-04 Thread Philip Thompson
On Nov 3, 2009, at 11:24 AM, Kim Madsen wrote: Hi Philip Try to post a link to a page, that prints phpinfo() -- Kind regards Kim Emax Philip Thompson wrote on 2009-11-03 17:11: Hi all. This seems like a trivial issue to fix, but I'm having issues. I'm running a script via command line a

[PHP] Re: PHP String convention

2009-11-04 Thread Nathan Rixham
Nick Cooper wrote: Hi, I was just wondering what the difference/advantage of these two methods of writing a string are: 1) $string = "foo{$bar}"; 2) $string = 'foo'.$bar; 1) breaks PHPUnit when used in classes (need to bug report that) 2) [concatenation] is faster (but you wouldn't notice)

[PHP] Re: Apache file order

2009-11-04 Thread Nathan Rixham
Skip Evans wrote: Hey all, I modified an Apache config file to list the HTML file first, after the PHP file, it still pulls up the PHP file first. Is there another setting in Apache I should be looking for? I need it to check for the HTML file first. Thanks, Skip DirectoryIndex index.

Re: [PHP] Re: What PHP version are you using?

2009-11-04 Thread Ashley Sheridan
On Wed, 2009-11-04 at 14:37 +, Nathan Rixham wrote: > Israel Ekpo wrote: > > Hi Guys, > > > > I just want to conduct a quick survey to find out what version of PHP people > > are using in their production environments. > > > > I have a PHP extension for Solr that I have set the minimum requi

[PHP] Re: Classes and Functions

2009-11-04 Thread Nathan Rixham
Daniel Kolbo wrote: Hello, Is there a way to see what objects and functions a script loaded/required/used? I could recursively loop through the globals, but if objects were unset, then i may miss some. I could make a 'tracking' object and every time i load/include a file (which contains a clas

Re: [PHP] Two Parser Passes

2009-11-04 Thread Nathan Rixham
Daniel Kolbo wrote: Steve wrote: Daniel Kolbo wrote: Hello, Is it possible to get a list (array) of classes not found in a script before the fatal error exits the parser. I realize that PHP parses the script twice. It would be nice at the end of the first parsing pass to check to see which c

[PHP] Re: What PHP version are you using?

2009-11-04 Thread Nathan Rixham
Israel Ekpo wrote: Hi Guys, I just want to conduct a quick survey to find out what version of PHP people are using in their production environments. I have a PHP extension for Solr that I have set the minimum required version as 5.2.11. http://pecl.php.net/package/solr/ However, most of the P

[PHP] Re: shell_exec fails to compile java class?

2009-11-04 Thread Nathan Rixham
דניאל דנון wrote: Hello! I need to use shell_exec (or any other similar function) in order to compile a java class-file. I have all the needed components installed on my computer (Windows XP with Java SDK) - I can use "java c:\path" in order to compile using Start->Run. When I try to do th

Re: [PHP] Custom function for inserting values into MySQL

2009-11-04 Thread Shawn McKenzie
In your example, I would name my form inputs similar to name ="data[user_id]". Then you just pass the $_POST['data'] array to your function. -Shawn Allen McCabe wrote: > You raise some good points. I always name my input fields after the > entity names ( eg. input type="hidden" name ="user_id" v