| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Comments:
<0> i needed 0,1 <0> php5 <0> 0,-1 <1> oh, REMOVE .. :P me gets blind <1> nebmo: $orderby = $_POST['orderby'] ? <2> nebmo - if ($_POST['sorderby'] == username) $order = 'ORDER BY username'; then $order goes to the mysql query <3> nebmo, you probably also would like to use <option value="blabla">Long long description of blabla</option> <1> nebmo: yea, you have no value set to it <1> nebmo: and dont what SunShineLady said, that's bloated code <4> :S <2> ^Artnez - what do you suggest then? <3> I'd go with if(bla) { $query .= addslashes(" order by $bla"); } <2> Chaosii - mysql injection!!! <3> hence the addslashes :) <5> what does php do when it encounters a deadlock on a innodb mysql table? <3> or mysql_real_escape_string.. whatever floats your boat
<6> mysql_real_escape_string(), not addslashes() <2> I would rather do a switch <1> nebmo: http://pastebin.com/577406 <4> i've pastebin'ed the page's code... --> http://pastebin.com/577405 <-- if that helps any (thanks_ <1> regex may be off :P <4> :) thanks... i'll try now quickly <3> aghhh it's a tenary operator !! help!! <5> i've been trying to write a database driven session handler, but the trouble is i've been getting read/write clashes <3> it's burning my eyes! aaagghh!! <2> ^Artnez - thats a nice one <1> zeasier: you probably will.. there's no point in doing that anyway <7> What's the good regex to parse csv in php? <5> ^Artnez: we use db sessions for server mirroring <2> ^Artnez - You know the times when you write some script then you see a better way of doing it so you feel bad about your code? damn you! <7> I'm not having luck with: ,(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\")) <7> (Shows as bad regex) <8> I wish there was a way to smack people with a sledgehammer over the Internet <9> madsara: http://de3.php.net/fgetcsv <8> I'm trying to help someone code a PHP page and he has NO FREAKIN CLUE HOW TO DEBUG <5> ^Migs^: yeah i don't why we fixed the ping of death <1> zeasier: the mirrors resolve to different domain names? <10> Hi, could someone help me with the syntax here: $finished_hand = str_replace($b,'<strong>.'$b'.</strong>',$replace_hand); <1> zeasier: not to go into a completely different direction, but if you want session handling via DB you're going to get a performance hit no matter what you do <11> gimmulf_ $finished_hand = str_replace($b,'<strong>'.$b.'</strong>',$replace_hand); <5> ^Artnez: it's multiple boxes all with the same vhost settings <10> cant i mix ahh the dots, thanks! <1> zeasier: then there's no point .. (ie: us1.php.net, us2.php.net).. if thats the case, you do not need to store sessions in the db to maintain session data between page loads <11> gimmulf_: or you could do $finished_hand = str_replace($b,"<strong>{$b}'</strong>",$replace_hand); <1> zeasier: sessions utilize cookies to store the session ID on the user's computer (they can p*** the session ID in the URL too, but if you're security practices are descent, this wont be a problem) <11> gimmulf_: or you could do $finished_hand = str_replace($b,"<strong>{$b}</strong>",$replace_hand); * <1> zeasier: cookies can be used across subdomains <11> gimmulf_: ignore the first one <5> ^Artnez: perhaps mirroring is the wrong term, i mean load balencing <11> load balancing <1> zeasier: in any case, if your users get swithced from eu.zeasier.com to us.zeasier.com, you shouldn't have a problem keeping the session data <5> AfroTurf: gaim warned me too don't worry <5> ^Artnez: that's nice, but from a purely retorical standpoint i'm still having trouble getting db transactions to lock my session properly <0> it takes me .017 seconds to pull a users profile from the database <5> i set autocommit to 0 and commit on my last query <0> profile = session <0> zeasier: and you did a start of the transaction correct? <5> myc yeah i did <0> kk thats my 0.02 <1> zeasier: what db? <5> it's mysql and an innodb table <1> version? <1> and version of PHP <5> php 5.0.something <5> and mysql 4ish <1> are you using MySQL or MySQLi <1> extension <5> just mysql mysql_query() etc <5> and yeah only vallina mysqld <1> hm.. is mysql spitting back errors? <11> zeasier: put <? phpinfo(); ?> in a page and give the info that ^Artnez needs <1> i might have missed it above <12> helo <5> it it just overwrites sessions if two requests run at once <12> i have a <textbox> and I want to convert all the "enters" in there into <br /> s using PHP <12> Is possible? <1> zeasier: ah so the locks arent working
<13> ShuaiKing: http://php.net/nl2br <5> ^Artnez: yup they aren't <12> sweet <12> thanks! <5> ^Artnez: what is supposed to happen when there is a deadlock? does php throw an error? <5> ^Artnez: or does it just wait for the lock to go away? <12> Aah, I keep forgetting. when you use double-quotes with a $variable, does it say $variable or does it report the variable contents? <14> hello guys, how can I set an array( "title" => "value") len ? <13> Eh? <1> zeasier: trying to remember... i was working with all of this stuff like 3 months ago <5> ShuaiKing: double quotes mean php parses the string for variables <14> hmm.. apologizes for my poor english <14> sorry, I am confused. I am working with mp3 files and its id3 tags. When I set the title for an id3 tag, it's ok, but when I read it, I read the title information, plus more characters till they get to the character len of 30 <14> understand what I mean? <1> zeasier: you have the code onhand so i can see the queries? <13> Ah. http://php.net/str_pad <1> zeasier: and PHP should wait a certain amount of time until the lock is lost <5> ^Artnez: ok that's good, i'll post the code one moment... <14> thanks mattmcc, I am going to see it now <5> http://pastebin.com/577449 <5> we have a custom database object, it more or less does what it's supposed to <15> Morning <13> What more could you ask from an object. <16> hello <5> db->autocommit(false) is SET AUTOCOMMIT = 0 <5> and db->commit() is COMMIT <16> this seems to work but is it ok to do this inside a cl***: $this = new MyCl***($arg); <10> How do i replace a blankspace with str_replace? how do i type the blankspace? <13> Press your spacebar? <10> for example if i want to replace "----- WORD -----" <17> Anyone know if there's a compelling reason key() can only return strings? <10> mattmcc: tried that :) <10> but it doesnt want to replace "----- WORD -----" <18> hi all <13> Toxygene: Hmm. $a = Array('foo'); var_dump(key($a)) -> int(0) <1> zeasier: where do you lock/unlock tables <18> is there a way to know the size or the name of the file before uploading it within a form ? <13> Fly_80: Nope. <17> mattmcc: Sorry, lemme be more specific, why can't Iternator::key() return objects... I want to implement a HashTable =( <5> ^Artnez: no where i'm using innodb transactions <13> Fly_80: Well, its name may be visible to JS. <1> zeasier: rows, rather <19> I have an interview tomorrow for a junior php developer role :S <13> Toxygene: Array keys can only be scalars. <20> Toxygene, think about what a key is <21> how do i make php work on command line when i type php file.php it wont work <10> mattmcc: if example: $string = "----- WORD -----"; $replace with = "something"; str_replace($string, $replace_with, $string); wont work <10> it doesnt replace it <5> ^Artnez: - i was under the impression you used SET AUTOCOMMIT = 0 and COMMIT to lock rows <14> mattmcc, it worked excellent! thanks a lot <1> well yes, the lock starts while the transaction is open <5> ^Artnez: that happens on line 17 and 64 <13> gimmulf_: Is the whitespace something other than a space? Like newlines, tabs, etc? <10> mattmcc: hmm could be but looks like a whitespace <17> well, a HashTable would be a really nice library and to make it traversable, key() needs to return objects <10> mattmcc: how do i make a tab? <1> well it seems right in structure ... only thought that comes to mind is if the SQL is off <13> "\t" <10> press tab? :) <10> okok <1> *off the mark <13> gimmulf_: You may also simply find http://php.net/trim useful. <5> hmm then i better log an paste it <1> zeasier: the idea is for the connection to wait until the lock has been let go <10> $to_replaca = "----\tWORD\t-----"; hmm what would the syntax be? :) <10> or that will do it? <1> zeasier: sorry gotta run <17> I guess my real question is, structurally, is there any reason why Iterator::key() won't let you return a object? <5> http://pastebin.com/577475 <13> Toxygene: Because keys can't be objects? <5> ^Artnez - oh thanks anyway <20> Toxygene, php has ***ociative arrays, what would you gain from making a hash table? (and why, or even how, would you use objects as keys?) <17> two parallel arrays of keys and values in side a cl*** that implements ArrayAccess and Iterator <17> er, just ArrayAccess
Return to
#php or Go to some related
logs:
#kde needs to wee-wee ubuntu could not open the device file /dev/nvidiactl #math tsql GROUP_CONCAT
tty2 /mnt/source filelists.xml.gz: [Errno -1] Metadata file does not match checksum startx Couldnt get a file descriptor referring to the console aquapad ubuntu glib-1.2.10 ubuntu
|
|