| |
| |
| |
|
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 32 33 34
Comments:
<0> babi: Actually, you can make an array of the wanted values and test it if the value is inside, but that'd be overkill... <1> yes, but Im trying to make a config-area.. so if "1" is set.. its only: else if($i == 1) .. <2> babi: If $i = 1, then that conditional will short cut anyways and the second == won't run. <0> babi: Use switch <2> ( True || <anything> ) shortcuts because True || <anything> will always be true. <1> mkey <3> why is svn so god aweful slow <0> winmutt: BEcause you have god damn awful slow server? <3> nope <3> good guess tho <3> storm <3> your right <4> erm could any1 point me towards a way of making sure that a character is between a-Z or 0-9 ? <0> !+enter <5> Don't use the enter key as puncuation. Think in complete thoughts, then type. <6> I got two arrays from a database: One just contains a lot of rows with a single number inside (array[row][id] array[0][0]=3;array[1][0]=4;....) the second array has also the [id] column but unsorted. how can i sort the 2nd array to be in the same [id] order as array #1 ?
<0> Andy--: Yes. ctype_alnum. <7> Andy--: http://www.php.net/ctype_alnum <0> *blink* <6> *blnk blink* <3> gar, i just found a bug in billing that goes back MONTHS <3> sigh <8> i have a float result which i want to output with only one fractional digit (eg. 9.6 instead of 9.6423526) <0> BigE: round() <0> damnit <9> bigsinep: round or sprintf <0> I ment BigSinep <10> could someone verify my logic on my profanity filter here? http://pastebin.ca/47981 <0> eh? o.O <3> ****** ****** *** <1> bah... in_array() solved the problem.. <0> [sellout]: Any good reasons, why you explode for no reason? <0> babi: *blink* <1> thanks <11> Hi, can someone help me with my php code? http://pastebin.com/638066 I will only do the search for the GEN and not USERNAME, or COUNTRY/STATE <0> [sellout]: Better question: Any good reason to use fopen()? <0> S^Gerbitz: Do you know, that your code is a walking security bomb? <7> And most code doesn't walk at all, so you know it's bad <9> Since it is later in the dya, i'll try this again. Anyone have experience with cURL and FTPS? <12> hey, I wonder if the score of a variable is the <?php ?> block it's in of the full page... <12> s/of/or <11> Stormchaser - what do you mean? <9> djib: full page <12> ok cool kennebel <12> thanks <11> Stormchaser - what do you mean my code is a walking bomb? <13> I'm getting a fatal error: Fatal error: Only variables can be p***ed by reference in <filename> on line 95 and I can't work out why, here's some of my code: http://pastebin.com/638086 can anyone help? <0> S^Gerbitz: From the security aspect your code is crap. <0> USERNAME LIKE '%".$USERNAME."%' AND <-- WTF? <0> enygma: Nope. <11> I had it %$USERNAME% but that didnt work either <0> S^Gerbitz: From the programmers perspective, your code is still crap. <0> !tell genelisp about references <0> !tell genelisp about reference <0> grrr... <0> !+& <5> [&] & is the PHP 'Reference' operator. See: http://php.net/references; & is Also the PHP bitwise AND operator. See: http://php.net/manual/en/language.operators.bitwise.php <13> Stormchaser: I know what a reference is <0> genelisp: Yes, and you should still read the documentation, because it holds the answer to your question. <0> S^Gerbitz: Do you have any idea, what your code actually does or how does it work? <11> Stormchaser - yes I do, a little <0> S^Gerbitz: a "little" doesn't cut it. <11> Stormchaser - I mean I know what everything does <0> S^Gerbitz: Then tell me, what does your SQL do. <11> message me please <0> S^Gerbitz: no, you message me. <14> anyone have a clue why i keep getting an error on this simple array code? http://pastebin.com/638119 <14> error is listed in the code <15> hi, is it possible to get read fields of a cl*** name from a file (ex. xml file) and set the value of that field? <16> amak: it's just data, parse it <0> !tell rift about arrays <17> nobody if it's possible to execute automaticly a download with a countdown ? <14> Stormchaser: i know about arrays...it something in the array_slice() function...everything seems to work perfect up until that point <16> toto: javascript html meta refresh <14> what's wrong with this? $a = array_slice($a, 12, 23, true) + array_slice($a, 0, 12, true); <17> it's obligatory in javascript ..
<15> ||cw: the prob is not parsing but using some kind of reflection like read "xpto" string and call setXpto() <16> rift: is your php version less than 5.0.2? <7> rift- this is what I get <7> Parse error: parse error, unexpected '[', expecting ')' <7> [0] => '00:00', isn't valid <14> Dragnslcr: sorry...that was a dump of that ... lemme redo that <0> !+func array_slice <5> array array_slice(array input, int offset [, int length]): Returns elements specified by offset and length <16> rift: preserve_keys wasn't added until 5.0.2 <14> Dragnslcr: http://pastebin.com/638139 <0> rift: Which PHP version? <14> Stormchaser: ||cw: thanks...we just downgraded the server yesterday...that's the prob <14> totally forgot <0> rift: Kill the server admin, then <16> why would you downgrade? <18> (does anyone know anything about mediawiki in here?) <16> no <0> #mediawiki <18> tried <8> how can i check if a query returned no results? <0> !+g8 <5> Guideline #8) SQL Q's: #sql, #mysql or #postgresql. Apache Q's: #apache. Linux Q's: Either #yourdistro, #linuxhelp or #linpeople. HTML/CSS/JavaScript Q's: #web. Just because some other channel is 'dead' does NOT mean you can ask here. <16> BigSinep: depends on database, some have a numrows function <0> [19:28:07] <0> READ the SQL. It's plain english, and figure out, if it's logical or not. <0> [19:28:39] S^Gerbitz [n=CrazyEdd@wsip-24-234-136-148.lv.lv.cox.net] has quit IRC: <-- I *hate* when people can't *think* <8> mysql... but mysql_num_rows() returns 0 if 1 row has been found (correct me if i'm wrong) <0> BigE: You're wrong. <0> Dammit. <8> :) <0> BigSinep: <8> let me make it easier for you <19> :D <0> funny <16> BigA: you are wrong, as long as you are actualy doing SELECT queries <19> ok and if a query returns 1 result, what does mysql_num_rows return ? <19> 1 ? <16> and as long as you aren't using unbuffered <16> yes <20> how do i turn on warnings and such in php? <20> and is there such a thing as mandatory variable declaration? <16> r0xoR: error_reporting <21> r0xoR: error_reporting() <19> funny because when i parse the $result array, if i do mysql_resut($result,0,'column name') i get a VALID smth <16> r0xoR: no <21> and no <20> ||cw aight then <20> thx <0> BigA: Why the HECK are you using mysql_result?)? <16> r0xoR: but if you turn on NOTICE level errors you will get a message when you try to use an uninitialized var <19> beacause that is how i learned ... <19> is there a better way (and why isn't mysql_result ok ?) <0> !+func mysql_fetch_***oc <5> array mysql_fetch_***oc(resource result): Fetch a result row as an ***ociative array <0> ^-- use that. <16> BigA: the man page for mysql_result explains why <19> can't you brief me shortly <16> speed for one <16> seems to me that mysql_result would have to do a full seek for each call, and if you are specifying field names would also have to do a column seek <19> aha <22> hi, is there a php function, which automatically forwards you to a given url/file? <16> where as the fetch functions keep a pointer to the current row and only have to advance, and they also copy the whole row out to an array so each filed access deons't have to seek again <0> Hijacker: header() <16> Hijacker: header('Location: ...' <0> enygma: As said before: No. <16> enygma: not in the same page view <22> ohw of course :) thanks a lot <19> ||cw: If two or more columns of the result have the same field names, the last column will take precedence. <= this is ugly <23> Stormchaser - I don't believe you ;) <16> you could certainly code a php script so that it can return a page OR an image <19> i can avoid it with aliases <19> but... still ugly <16> BigA: so alias the field names in sql. ugly or not, it's ALWAYS confusing to have duplicate field names in a result
Return to
#php or Go to some related
logs:
Bad protocol version identification pscp #php #php add wlan0 linux debian doesn't contain a valid partition table aticonfig viewsonic 1600x1200 #python Got error 134 when reading table 915resolution init command line goodtod
|
|