Re: [PHP] Re: Multithreading for OOP PHP

2012-11-03 Thread Dotan Cohen
?) for now, there is no need, only poor design. What? i don't know what you mean by massively parallel architecture but it certainly has no relevancy to the PHP dev who wants to run a long SQL query. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http

Re: [PHP] Multithreading for OOP PHP

2012-10-31 Thread Dotan Cohen
really don't need it hogging up the CPU when a real C program can do the intensive work. And if you need threading, then you are very likely looking at exactly the type of workload that PHP is designed not to do! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General

Re: [PHP] Re: No error reporting on

2012-04-23 Thread Dotan Cohen
On Mon, Apr 23, 2012 at 14:18, Jim Giner jim.gi...@albanyhandball.com wrote: Just my $.02, but don't you need: ini_set('display_errors', '1'); as well? Possibly, thanks. I actually don't have access to that! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General

Re: [PHP] Re: No error reporting on

2012-04-23 Thread Dotan Cohen
the main script without a very good reason. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What is the mnemonic for date()'s Day format?

2012-02-13 Thread Dotan Cohen
! Let me know first if you ever have any dirt on me, Matijn! Thank you for the mnemonic full. I'll know next week if it sticks or not. Though, I already foresee myself trying to use f! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] What is the mnemonic for date()'s Day format?

2012-02-13 Thread Dotan Cohen
sometimes calls days jours.  Not that it helps me remember it, I have to refer to that page pretty much every time I use date(). I also refer to that page enough to have it bookmarked on my homepage! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List

Re: [PHP] How to detect languages from (= LTR vs RTL)

2012-02-07 Thread Dotan Cohen
) ) { return LTR; } return FALSE; } -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to detect languages from (= LTR vs RTL)

2012-02-07 Thread Dotan Cohen
On Tue, Feb 7, 2012 at 19:31, Dotan Cohen dotanco...@gmail.com wrote: function is_strong($char) {    if (  in_array($char, $arrayOfRtlCharacters)  ) {        return RTL;    }    if (  in_array($char, $arrayOfLtrCharacters)  ) {        return LTR;    }    return FALSE; } On second

[PHP] How to find where class is used?

2012-01-06 Thread Dotan Cohen
is created? Thanks. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to find where class is used?

2012-01-06 Thread Dotan Cohen
! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-26 Thread Dotan Cohen
their competence, you win ;) Change the access libraries for the devs? I think that you've gone a bit too far! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
about not using mysql_real_escape_string() on that $password variable! Please reassure me or tell me the folly of my ways. Thanks! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
is rebuilt without MD5 hash support, or some other oddity that is on the outside edge of possibility. The rebuild without md5 is an interesting point. That sounds exactly like the type of it-will-never-happen-until-it-happens-to-me problems! Thanks for the heads up. -- Dotan Cohen http

Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
Thanks Igor. I will sleep peacefully this night! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
On Wed, Sep 21, 2011 at 22:36, Daniel Brown danbr...@php.net wrote:    I should've specified, though, that then you would simply have the fatal error message (call to undefined function) pass through, not the unhashed original text. Yes, that is obvious. -- Dotan Cohen http

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-14 Thread Dotan Cohen
faster than any ON clause, or work on an optimized subselect, especially if you are running a cluster. Agreed. In fact I don't know from where the array is coming, that's not my part of the code! But I agree that if it is coming from mysql then a join would be preferable. -- Dotan Cohen http

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-14 Thread Dotan Cohen
query will be doomed. Inner joins in,this is the best option for this . You can use a temp table for this Thanks Chetan. I will keep that in mind if I ever get around to learning about subselects. Have a great day! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-14 Thread Dotan Cohen
mysql_real_escape_string(). -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-14 Thread Dotan Cohen
special_table ORDER BY special_id LIMIT 0, 1000) AS table2 USING (id) Note: syntax may not be valid, but should be fairly straight forward to fix, have no time to play with it though... Thanks. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http

[PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-13 Thread Dotan Cohen
that I am interested in? Thanks! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-13 Thread Dotan Cohen
for! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-13 Thread Dotan Cohen
 ) } Thank you Muad! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-13 Thread Dotan Cohen
! Are you querying the database to get the id's in the frist place?  if so, you could look at doing an inner join on the 2 tables. Actually, I do suspect that is where it's coming from. But the calling function is not in my hands. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-13 Thread Dotan Cohen
depends on how you want to do it...  but that would make it 1 db query I personally would stick with the inner join as I know that syntax, but thanks for introducing me to the subselect. I have never seen that. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-13 Thread Dotan Cohen
is never exactly 50 but rather some arbitrary large number. But there is no need for LIMIT, that is the purpose of the _INNER_ JOIN. INNER means to only return the matching rows. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] Where is the code for this page?

2011-08-18 Thread Dotan Cohen
. Thanks. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Where is the code for this page?

2011-08-18 Thread Dotan Cohen
On Thu, Aug 18, 2011 at 23:17, Daniel Brown danbr...@php.net wrote:    Depending on your keyboard layout, yes.  ;-P It is on all four of mine :)    If you like operators with your grep, try grepping on steroids by using egrep (`man egrep`). I'll look into that. Thanks! -- Dotan Cohen

Re: [PHP] Queries and Common Practices

2011-05-22 Thread Dotan Cohen
practice of redundancy in the name of consistency. If nothing at the least, it gets us used to looking at the code to debug as above. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] [Semi-OT] Request for help: Squirrelmail, PHP and RTL-Languages

2011-03-16 Thread Dotan Cohen
. Are you getting directional display issues? Gibberish? -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to write code: how wrong am I?

2011-02-23 Thread Dotan Cohen
that I cannot afford. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
# or Java beginners. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
on the complexity of surrounding code. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
in the sea of parenthesis. Therefore, I always close elements before filling them in. It keeps the mind's state machine saner! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to write code: how wrong am I?

2011-02-22 Thread Dotan Cohen
. Like this I suppose: if (something) if (something) { } if (something) { // Code here } -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-21 Thread Dotan Cohen
and to-the-point post. Constructive advice: trim the sig! Thanks! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-21 Thread Dotan Cohen
at retrieval time advantage far outweighs the update-half-the-table issue upon addition of an additional category. Thanks! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-21 Thread Dotan Cohen
. This was a terrific example. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 18:20, Dotan Cohen dotanco...@gmail.com wrote: On Thu, Jan 20, 2011 at 17:00, Richard Quadling rquadl...@gmail.com wrote: I'd have my items table, my tags table and a join table for the two. My join table is really simple. UniqueID, ItemID, TagID. Yes

[PHP] Re: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
: 10 is fiction, 10.05 is crime novels, 10.05.07 is British authors, and so forth. Your `tags` table then looks like Thanks. I prefer the parent tag field, though, I feel that it is more flexible. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
. Is that strategy widely deployed, then? It seems so unruly having to change on average half the database records for every new leaf. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
, for humanity, not for gain, other than personal freedom. An equation that benefited all, and yet gain is a personal product. Also, if you can answer it, is gravity anymore than interplanetary static cling? Is this a troll? Am I about to be baited? -- Dotan Cohen http://gibberish.co.il http

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
that a customer exists, that implies compensation, and therefore fair bait. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] RE: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
with the hierarchical model. Which do you call the hierarchical model? That term is not used in the linked article. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-30 Thread Dotan Cohen
, it is as entertaining as it is informative. Who needs slashdot with action like this? If this stuff ever comes up again, will the participants be so kind as to CC me so I don't miss it? Thanks! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-29 Thread Dotan Cohen
in the the username only: Your username [begins||ends] with an errant space. Please reenter your credentials more carefully. I hope that they figure out to check their passwords as well. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-29 Thread Dotan Cohen
. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-29 Thread Dotan Cohen
. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-29 Thread Dotan Cohen
? Lasspass is great for this. You can then export and print your Lastpass data, put it on a removable media, or access it via web access. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
. Of course, if I trim() also when the user is setting his password then he will never know that his password is really 1 digit shorter, but do I really want to do that? Thoughts? Thanks! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
an exclamation point in my password. I might be an extreme example, but it is behaviour that I do not agree with. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
capture and reuse the hashed password. But before all that goes on, I have to decide what to do about leading and trailing spaces. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
on the client, testing for this, then logging it to a separate database with no correlation to the users. Interesting it will be, at least. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
water flow uphill, or reversing aging? I can do a lot of things, but don't even ask me to bring back the dead! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
. But before all that goes on, I have to decide what to do about leading and trailing spaces. As has been noted a couple of times: trim usernames. Never trim passwords. I think that is right. I needed that push. Thanks. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
$enteredPassword!=$realPassword){ print pWarmer!/p; } I'm kidding. I'll not trim. But if $trimmedUsername != $enteredUsername I'll mention that fact to the user and remind him to be careful to copy exactly what he means to copy. Username only, not password. -- Dotan Cohen http://gibberish.co.il

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
key of the cert. I just realize that this would also completely solve your trim() problem! Hello, Dotan? Hi, we haven't spoken in a full week now that we don't have the trim problem. But I reinstalled Windows and wiped the drive, now I can't log in. Can you help me? -- Dotan Cohen http

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
at it, how about adding just one little feature... -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
On Tue, Dec 28, 2010 at 22:43, Nathan Rixham nrix...@gmail.com wrote: that's what pkcs12 was invented for, just issue another certificate / key pair. I could probably automate and script it, I would just give the users a name/password combo to their own control panel... -- Dotan Cohen http

Re: [PHP] Re: Do you trim() usernames and passwords?

2010-12-28 Thread Dotan Cohen
, the way we were, the DeLorean, the secret of nirvana, and all of my exabytes of pr0n collections. Did you know that when you type 'brown1' we see it as **? Your system does that automatically. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List

[PHP] Re: Zip files: generate text file in archive on the fly

2010-10-21 Thread Dotan Cohen
I found this terrific tool for creating dynamic zip files: http://pablotron.org/software/zipstream-php/ -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Zip files: generate text file in archive on the fly

2010-10-17 Thread Dotan Cohen
of this in the fine manual, and even googling has led me nowhere. Ideas? Am I missing something obvious? Thanks! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Standalone WebServer for PHP

2010-09-13 Thread Dotan Cohen
totally closed to the outside world other than to their internal employees? Or is this something that can only be provided by a LAN with no Internet connection? Filter on IP address. Not foolproof, but mostly there. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP

Re: [PHP] Standalone WebServer for PHP

2010-09-13 Thread Dotan Cohen
run web-languages such that users in the office could access their server and run scripts using browsers? Just connect them to a router and don't connect the router to the WAN. Each machine will get it's own IP address (assuming that the router is running a DHCP server). -- Dotan Cohen http

[PHP] What are the curly brackets around variables in SQL statements for?

2010-07-21 Thread Dotan Cohen
Take for example: INSERT INTO table ( field ) VALUES ('{$variable}' ) Why the curly brackets? Where in the fine manual is this addressed? I started from [1] but did not find the relevant info. [1] http://il2.php.net/manual/en/book.mysql.php -- Dotan Cohen http://gibberish.co.il http://what

Re: [PHP] What are the curly brackets around variables in SQL statements for?

2010-07-21 Thread Dotan Cohen
is not a valid character in a variable name. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What are the curly brackets around variables in SQL statements for?

2010-07-21 Thread Dotan Cohen
_just_finished_ reading that page! -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] protecting email addresses on a web site

2010-06-14 Thread Dotan Cohen
-paste? -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php quiz script/tutorial

2010-04-27 Thread Dotan Cohen
concerns about accessibility for both of these. Does anyone have any experience of writing quizzes with php and if so, can you recommend any resources to get me started? TIA Paul HTML has a form element with radio buttons, text fields, and more. Use that. -- Dotan Cohen http://bido.com http

Re: [PHP] Math Question....

2010-04-23 Thread Dotan Cohen
items each (done in my head, so I might be off a little)? -- Dotan Cohen http://bido.com http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Dotan Cohen
$_POST or $_GET as you _know_ what they will return. Don't forget, there might even be a cookie with the name foo. -- Dotan Cohen http://bido.com http://what-is-what.com Please CC me if you want to be sure that I read your message. I do not read all list mail. -- PHP General Mailing List (http

[PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Dotan Cohen
other drawbacks or things to be aware of? Thanks. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il Please CC me if you want to be sure that I read your message. I do not read all list mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Dotan Cohen
On 19 February 2010 16:27, tedd tedd.sperl...@gmail.com wrote: At 3:18 PM +0200 2/19/10, Dotan Cohen wrote: In order to prevent SQL injection, can one simply base64 encode the data and store that? Then it can be decoded when I need to display it on a website. I understand that this means

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Dotan Cohen
= INSERT INTO `comments` (user_id, comment) VALUES ($user_id, '$comment'); ? I see what you mean. In fact, userIDs are stored, and indeed I ensure that they are integers! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il Please CC me if you want to be sure that I read your message. I

Re: [PHP] Using base64 encode and decode to store user data in database

2010-02-19 Thread Dotan Cohen
What about eBook ($23.99)? http://oreilly.com/catalog/9780596006563 If you can get this, you can get that. That may be a good idea. Certainly better than the pirate bay. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il Please CC me if you want to be sure that I read your

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-24 Thread Dotan Cohen
verbally, even when one could simply fax a photo of a grape and a glass of wine. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-23 Thread Dotan Cohen
and a greater-than sign. Capiche?  Problem solved. ;-) That is what was done, but I wanted to know if there was already some agreed-upon language. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-21 Thread Dotan Cohen
() is not adequate. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-21 Thread Dotan Cohen
, but sometimes unavailable due to technological limitations. Daevid. Is your name related to David? I have never seen this spelling, and my interest in etymology is overwhelming. What is the origin of this name or spelling? Thanks! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-21 Thread Dotan Cohen
If you look a little closer, you will see that I am not using addslashes().  Rather, I am using addcslashes().  This allows to specify the characters that I want escaped, instead of the default assumed characters from addslashes(). I do not know which characters to escape. -- Dotan Cohen

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-21 Thread Dotan Cohen
but I suppose that it is possible for someone to spoof a non-UTF-8 POST request. I do not want to take the development of a secure function into my own hands. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Dotan Cohen
else have an opinion on this? -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Dotan Cohen
? Potentially wasteful, but the architecture in this idea is a little different from the norm. Very wasteful indeed, I cannot be so irresponsible with this server. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Dotan Cohen
) Not all of the functions are used in all scripts, however, this file of reusable functions is included in all of them. Only the clean_mysql function gives me trouble because it calls mysql_real_escape_string(). -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Dotan Cohen
, and even though I cannot make use of it at least I know in general what needs to be done. Thanks. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Dotan Cohen
($error_reporting); Thanks, I will try that this evening. I may not have permissions for that, but we'll see. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Dotan Cohen
. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Dotan Cohen
if(@mysql_real_escape_string($variable) === false) Perfect! The @ symbol suppresses the error and I can structure the code according to whether or not there is a connection. Thank you! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-19 Thread Dotan Cohen
2009/10/19 Kim Madsen php@emax.dk: Dotan Cohen wrote on 2009-10-18 21:21: I thought that one could not test if a database connection is established or not, this is the most relevant thing that I found while googling that: http://bugs.php.net/bug.php?id=29645 from http://www.php.net

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-18 Thread Dotan Cohen
. It is good to know, though. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-18 Thread Dotan Cohen
* and/or str_replace and the likes. All the connections are to MySQL databases, but to _different_ MySQL databases on the same host. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-17 Thread Dotan Cohen
As for following a convention, just get the PHP terminology right, That is what I was hoping to learn! or at least agree on your on bastardized terminology. Because this may cause problems in the future. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
such as - and the like. Thanks. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
open parenthesis $item getServiceId question symbol $item getServiceId colon $item getId close parenthesis How would you mention the - constructs? Certainly they are not assumed? -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
over the phone when a computer or other internet-enabled device was not accessible. Therefore, we would prefer to formulate a shared language now for use in such situations. Surely when coding, people say what they are typing in their heads. I do, but not in English. -- Dotan Cohen http://what

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
, the other end of the phone is an experienced PHP developer. In any case, Ashley's nailed the foolproof technique for sure :) But I am the fool to prove it! No internet access! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
get service id if condition results are false issue following command        Using object variable item call object member method get id Thanks, that is probably best. Leave the code to the coder, but transmit the intention. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
the method again, otherwise call the getId method of the $item object Thanks! I'm guessing the reason you were on the phone to him/her was because your parentheses don't match ... but that's a different story I guess. That actually sounds like a subplot of a good movie. -- Dotan Cohen

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-16 Thread Dotan Cohen
If they can reach you by phone you are not on vacation. You are still attached to their leash. And they still throw me bones :) It's worth it! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

  1   2   3   4   5   6   >