Re: [PHP] LDAP import a csv file from php

2010-04-27 Thread Jim Lucas
Manolis Vlachakis wrote: Hallo there everyone.. first thing first i would like to thank everyone for the help that this mailing list has provided me throughout my project.. i have found many answers and got me out of black point many times!!! now i am on my last step on my project and i would

[PHP] Error handling strategies (db related)

2010-04-27 Thread Gary .
How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction which fails on the n-th insert. Ok, you roll back the transaction, no problem. How do you then inform the user? Just using the text from pg_result_error or something? -- PHP General Mailing List

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 10:42, Gary . php-gene...@garydjones.name wrote: How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction which fails on the n-th insert. Ok, you roll back the transaction, no problem. How do you then inform the user? Just using the

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Michiel Sikma
On 27 April 2010 10:42, Gary . php-gene...@garydjones.name wrote: How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction which fails on the n-th insert. Ok, you roll back the transaction, no problem. How do you then inform the user? Just using the

[PHP] special character problem

2010-04-27 Thread saeed ahmed
hello friends, I have used preg_replace('/[^0-9a-zа\~...@\$\%\^\*\(\)\;\,\.\'\/\_]/i', ' ',$match); for remove the special characters. its work fine. but the problem I want to remove special characters from this kind of sentence /// #: quot;'Amor''' é fogo que arde sem se ver,'' #: ''é

Re: [PHP] special character problem

2010-04-27 Thread Ashley Sheridan
On Tue, 2010-04-27 at 16:41 +0600, saeed ahmed wrote: hello friends, I have used preg_replace('/[^0-9a-zа\~...@\$\%\^\*\(\)\;\,\.\'\/\_]/i', ' ',$match); for remove the special characters. its work fine. but the problem I want to remove special characters from this kind of sentence

[PHP] Weird while issue

2010-04-27 Thread Juan Rodriguez Monti
Hi guys, I have some issues with while. I have an HTML Form, that uses GET to process its contents. Then there's a PHP Script that receives the data, and evaluates the fields. So, in some instance of the code, I do something like : if (empty($a) AND empty($b)) { echo something; echo something;

Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Richard Quadling
On 26 April 2010 19:54, Williams, Dewey willi...@uncc.edu wrote: The only online games I play are Guild Wars and - now - Dungeons and Dragons Online (FREE!).  I haven't played vgaplanets in ages - too few servers to get a decent game. Not certain I can even install my original 3.5 inch disk

Re: [PHP] Weird while issue

2010-04-27 Thread Peter Lind
On 27 April 2010 14:36, Juan Rodriguez Monti j...@rodriguezmonti.com.ar wrote: Hi guys, I have some issues with while. I have an HTML Form, that uses GET to process its contents. Then there's a PHP Script that receives the data, and evaluates the fields. So, in some instance of the code, I

Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Programming Guides
On Tue, Apr 27, 2010 at 7:37 AM, Richard Quadling rquadl...@googlemail.comwrote: On 26 April 2010 19:54, Williams, Dewey willi...@uncc.edu wrote: The only online games I play are Guild Wars and - now - Dungeons and Dragons Online (FREE!). I haven't played vgaplanets in ages - too few

Re: [PHP] Weird while issue

2010-04-27 Thread Juan Rodriguez Monti
2010/4/27 Peter Lind peter.e.l...@gmail.com: On 27 April 2010 14:36, Juan Rodriguez Monti j...@rodriguezmonti.com.ar wrote: Hi guys, I have some issues with while. I have an HTML Form, that uses GET to process its contents. Then there's a PHP Script that receives the data, and evaluates

Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Dan Joseph
On Tue, Apr 27, 2010 at 9:24 AM, Programming Guides programming.gui...@gmail.com wrote: I've played and still play StarCraft: Brood War a lot. StarCraft 2 is now available for pre-order and the beta is active. I'm looking forward to it but I'm not looking forward to how much time I'll sink

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Paul M Foster
On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote: How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction which fails on the n-th insert. Ok, you roll back the transaction, no problem. How do you then inform the user? Just using the text

Re: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Programming Guides
On Tue, Apr 27, 2010 at 8:27 AM, Dan Joseph dmjos...@gmail.com wrote: On Tue, Apr 27, 2010 at 9:24 AM, Programming Guides programming.gui...@gmail.com wrote: I've played and still play StarCraft: Brood War a lot. StarCraft 2 is now available for pre-order and the beta is active. I'm

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote: How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction which fails on the n-th insert. Ok, you roll back the transaction,

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Gary .
On Tue, Apr 27, 2010 at 10:46 AM, Peter Lind wrote: On 27 April 2010 10:42, Gary . wrote: How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction which fails on the n-th insert. Ok, you roll back the transaction, no problem. How do you then inform

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Paul M Foster
On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote: On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote: How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote: On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote: How do you guys handle errors

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Paul M Foster
On Tue, Apr 27, 2010 at 04:13:20PM +0200, Peter Lind wrote: On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote: On 27 April 2010 15:36, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 16:24, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 04:13:20PM +0200, Peter Lind wrote: On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote: On 27 April 2010 15:36, Paul M

[PHP] finding out datasets in a certain distance of a zip code

2010-04-27 Thread Merlin Morgenstern
Hi there, I am trying to find mysql db entries inside a tabel with the help of php that are in the distance of a certain amount of kilometers from a given zip code. Unfortunatelly something must be wrong, as I do not get the desired results. Has anybody experience with that? Here is the

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Nathan Rixham
Peter Lind wrote: On 27 April 2010 16:24, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 04:13:20PM +0200, Peter Lind wrote: On 27 April 2010 16:07, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Apr 27, 2010 at 03:41:04PM +0200, Peter Lind wrote: On 27 April

[PHP] Re: finding out datasets in a certain distance of a zip code

2010-04-27 Thread Nathan Rixham
Merlin Morgenstern wrote: Hi there, I am trying to find mysql db entries inside a tabel with the help of php that are in the distance of a certain amount of kilometers from a given zip code. Unfortunatelly something must be wrong, as I do not get the desired results. Has anybody

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Teus Benschop
I'm still shocked you guys are still writing code that has errors in it, what's worse is you know about the errors, and instead of fixing them you're just telling the user about it! The point here is that we, programmers, know that we write code with bugs in it. We are realistic about it,

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread tedd
At 9:36 AM -0400 4/27/10, Paul M Foster wrote: On Tue, Apr 27, 2010 at 10:42:03AM +0200, Gary . wrote: How do you guys handle errors during, say, db insertions. Let's say you have an ongoing transaction which fails on the n-th insert. Ok, you roll back the transaction, no problem. How do

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Nathan Rixham
Teus Benschop wrote: I'm still shocked you guys are still writing code that has errors in it, what's worse is you know about the errors, and instead of fixing them you're just telling the user about it! The point here is that we, programmers, know that we write code with bugs in it. We are

RE: [PHP] What's your game? (X-PHP)

2010-04-27 Thread Tommy Pham
-Original Message- From: Programming Guides [mailto:programming.gui...@gmail.com] Sent: Tuesday, April 27, 2010 6:35 AM To: Dan Joseph Cc: php-general@lists.php.net Subject: Re: [PHP] What's your game? (X-PHP) On Tue, Apr 27, 2010 at 8:27 AM, Dan Joseph dmjos...@gmail.com wrote:

RE: [PHP] Re: finding out datasets in a certain distance of a zip code

2010-04-27 Thread Tommy Pham
Hi Nathan, WOW!! 4GB when rar'ed. That must too you a while to compile that information. Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread tedd
At 4:13 PM +0200 4/27/10, Peter Lind wrote: If only the world consisted of smart users ... I think, however, that we're generally closer to the opposite. And no, I don't hate users - I've just seen too many people do things that were very far removed from smart. Regards Peter Peter et al:

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread tedd
At 10:24 AM -0400 4/27/10, Paul M Foster wrote: Unfortunately, true. Sometimes I think computer users should be required to take a course in using a computer before being allowed behind the keyboard. Paul Yeah, like I believe that everyone should do through at least one divorce before

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Ashley Sheridan
On Tue, 2010-04-27 at 12:12 -0400, tedd wrote: At 4:13 PM +0200 4/27/10, Peter Lind wrote: If only the world consisted of smart users ... I think, however, that we're generally closer to the opposite. And no, I don't hate users - I've just seen too many people do things that were very far

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread tedd
At 4:31 PM +0200 4/27/10, Peter Lind wrote: While I love to rant at stupid users, the truth is probably that programmers are the ones who should take courses in how users think. In the end, if I fail to understand my users, it doesn't matter how great my program is: they'll still fail to use it.

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread tedd
At 4:23 PM +0100 4/27/10, Nathan Rixham wrote: I'm still shocked you guys are still writing code that has errors in it, what's worse is you know about the errors, and instead of fixing them you're just telling the user about it! :p Here's my code that doesn't contain errors: ?php ?

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Peter Lind
On 27 April 2010 18:21, tedd tedd.sperl...@gmail.com wrote: At 4:31 PM +0200 4/27/10, Peter Lind wrote: While I love to rant at stupid users, the truth is probably that programmers are the ones who should take courses in how users think. In the end, if I fail to understand my users, it

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread tedd
At 5:09 PM +0100 4/27/10, Ashley Sheridan wrote: Sounds like you've got a few stories that would a lot of people happy were you to share them on the DailyWTF ;) Thanks, Ash Ash: Sharing them here is more direct and meaningful to what we do, but I will investigate what you suggest.

Re: [PHP] Re: What's your game? (X-PHP)

2010-04-27 Thread David Harkness
Left 4 Dead 2, by far my favorite game on the PC, is my current fixation. I enjoy Battlefield 2: Bad Company but tend to get annoyed having to face opponents 5-10 x my level. You can find me as Captain Cujo on both games. On Sun, Apr 25, 2010 at 10:37 AM, Nathan Rixham nrix...@gmail.com wrote:

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Ashley Sheridan
On Tue, 2010-04-27 at 12:31 -0400, tedd wrote: At 5:09 PM +0100 4/27/10, Ashley Sheridan wrote: Sounds like you've got a few stories that would a lot of people happy were you to share them on the DailyWTF ;) Thanks, Ash Ash: Sharing them here is more direct and meaningful to

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Paul M Foster
On Tue, Apr 27, 2010 at 12:12:31PM -0400, tedd wrote: At 4:13 PM +0200 4/27/10, Peter Lind wrote: If only the world consisted of smart users ... I think, however, that we're generally closer to the opposite. And no, I don't hate users - I've just seen too many people do things that were very

RE: [PHP] Error handling strategies (db related)

2010-04-27 Thread Tommy Pham
At 10:24 AM -0400 4/27/10, Paul M Foster wrote: Unfortunately, true. Sometimes I think computer users should be required to take a course in using a computer before being allowed behind the keyboard. Paul I came across a term long ago amidst my readings: PEBKAC Problem Exists Between Keyboard

Re: [PHP] php quiz script/tutorial

2010-04-27 Thread tedd
At 4:12 PM +0100 4/26/10, Paul Jinks wrote: I'm considering my options for making quizzes mostly multiple choice type of thing, but also 'filling in the gaps'. This is in support of educational materials I'm working on. So far I've looked at Flash and javascript but have concerns about

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Gary .
On 4/27/10, tedd wrote: At 4:23 PM +0100 4/27/10, Nathan Rixham wrote: I'm still shocked you guys are still writing code that has errors in it, what's worse is you know about the errors, and instead of fixing them you're just telling the user about it! :p Here's my code that doesn't contain

Re: [PHP] php quiz script/tutorial

2010-04-27 Thread Dotan Cohen
On 26 April 2010 18:12, Paul Jinks p...@pauljinks.co.uk wrote: I'm considering my options for making quizzes mostly multiple choice type of thing, but also 'filling in the gaps'. This is in support of educational materials I'm working on. So far I've looked at Flash and javascript but have

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Andrew Ballard
On Tue, Apr 27, 2010 at 12:23 PM, tedd tedd.sperl...@gmail.com wrote: At 4:23 PM +0100 4/27/10, Nathan Rixham wrote: I'm still shocked you guys are still writing code that has errors in it, what's worse is you know about the errors, and instead of fixing them you're just telling the user

Re: [PHP] php quiz script/tutorial

2010-04-27 Thread Adam Richardson
On Tue, Apr 27, 2010 at 12:55 PM, tedd tedd.sperl...@gmail.com wrote: At 4:12 PM +0100 4/26/10, Paul Jinks wrote: I'm considering my options for making quizzes mostly multiple choice type of thing, but also 'filling in the gaps'. This is in support of educational materials I'm working on. So

[PHP] auto indentation

2010-04-27 Thread David McGlone
Hi everyone. I got a quickie LOL is there a way to auto indent code. I'm using Kate and I have it set so the tab is only 4 spaces, but I was wondering if there was an easier way than to have to hit the tab key 1x then 2x then 3x then 2x then 1x to create nice laid out code like this: -

Re: [PHP] auto indentation

2010-04-27 Thread shiplu
There is a command indent in your kde. Check the manual Shiplu Mokaddim My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List

Re: [PHP] auto indentation

2010-04-27 Thread Ashley Sheridan
On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: Hi everyone. I got a quickie LOL is there a way to auto indent code. I'm using Kate and I have it set so the tab is only 4 spaces, but I was wondering if there was an easier way than to have to hit the tab key 1x then 2x then 3x

Re: [PHP] auto indentation

2010-04-27 Thread D. Dante Lorenso
On 4/27/2010 3:55 PM, Ashley Sheridan wrote: On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: Hi everyone. I got a quickie LOL is there a way to auto indent code. I'm using Kate and I have it set so the tab is only 4 spaces, but I was wondering if there was an easier way than to have to

Re: [PHP] auto indentation

2010-04-27 Thread Programming Guides
On Tue, Apr 27, 2010 at 6:00 PM, D. Dante Lorenso da...@lorenso.com wrote: On 4/27/2010 3:55 PM, Ashley Sheridan wrote: On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: Hi everyone. I got a quickie LOL is there a way to auto indent code. I'm using Kate and I have it set so the tab

Re: [PHP] auto indentation

2010-04-27 Thread Paul M Foster
On Tue, Apr 27, 2010 at 08:52:09PM -0500, Programming Guides wrote: On Tue, Apr 27, 2010 at 6:00 PM, D. Dante Lorenso da...@lorenso.com wrote: On 4/27/2010 3:55 PM, Ashley Sheridan wrote: On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: Hi everyone. I got a quickie LOL is

Re: [PHP] auto indentation

2010-04-27 Thread David McGlone
On Tuesday 27 April 2010 16:55:45 Ashley Sheridan wrote: On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: Hi everyone. I got a quickie LOL is there a way to auto indent code. I'm using Kate and I have it set so the tab is only 4 spaces, but I was wondering if there was an

Re: [PHP] auto indentation

2010-04-27 Thread David McGlone
On Tuesday 27 April 2010 19:00:29 D. Dante Lorenso wrote: On 4/27/2010 3:55 PM, Ashley Sheridan wrote: On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: Hi everyone. I got a quickie LOL is there a way to auto indent code. I'm using Kate and I have it set so the tab is only 4

Re: [PHP] auto indentation

2010-04-27 Thread Programming Guides
On Tue, Apr 27, 2010 at 9:15 PM, Paul M Foster pa...@quillandmouse.comwrote: On Tue, Apr 27, 2010 at 08:52:09PM -0500, Programming Guides wrote: On Tue, Apr 27, 2010 at 6:00 PM, D. Dante Lorenso da...@lorenso.com wrote: On 4/27/2010 3:55 PM, Ashley Sheridan wrote: On Tue,

Re: [PHP] auto indentation

2010-04-27 Thread Paul M Foster
On Tue, Apr 27, 2010 at 10:29:33PM -0400, David McGlone wrote: On Tuesday 27 April 2010 19:00:29 D. Dante Lorenso wrote: On 4/27/2010 3:55 PM, Ashley Sheridan wrote: On Tue, 2010-04-27 at 16:33 -0400, David McGlone wrote: Hi everyone. I got a quickie LOL is there a way to auto