@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
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



Comments:

<0> #306090
<0> 7 means - 7 bytes
<1> strlen()
<2> cfg: That's not something generated by PHP.
<0> and after 7 is conent
<0> maybe some issue ?
<3> Xorlev: my CMS can't handle php5 yet...... if that was to me, I am not sure...
<1> cfg: eh?
<4> cfg: this is for static HTML files?
<0> i dont know if it is apache or php
<0> nope
<0> script
<2> cfg: Now you know. It's not PHP.
<0> it seems, that for static all is okey
<4> what about a script just containing '<? echo 'test'; ?>' ?
<0> hmm.. i cant try it now



<0> but maybe some suggestions if it is php ?
<5> ries: Ah. It's not that hard to convert though.
<6> bullrage: i want you to paste, in channel, the result of: echo $db_query;
<5> Is there any alternate form of storage you could use other than XML? Something with less parsing overhead?
<4> bullrage: ah. it's that query at the end?
<7> Xyphoid: Aye.
<4> why are you using printf?
<7> jfarrell: INSERT INTO dvd_title (id, title, year, genre, runtime, plot, link, added) VALUES (NULL, 'dsfs', 2005, 'dsfsd', '04:08', 'sdfsd', 'dsfsd', NOW())145
<2> bullrage: You're mistaken
<6> problem found!!
<2> bullrage: The result of "echo $db_query;" is "145"
<2> bullrage: Which clearly is not valid SQL
<2> You're attempting to do mysql_query("145");
<7> Xyphoid: I was reading the manual for mysql_real_escape_string and an example in there used printf to do the quote_smart bit
<2> MySQL is rightfully choking on it.
<6> ahh i see it
<6> you prolly want sprintf
<2> bullrage: You need to go read what printf() does
<2> It doesn't do what you think it does
<6> hehe
<4> you don't need either, you're ust doing string concatenation
<6> TML: so my friend Adam wants me to work on this project for one of his cleints. Hes too busy
<6> the client us using this framework called LogicReate
<5> sprintf() isn't needed in that example. The concatenation operator works just as well.
<6> so I of course have downloaded so I can play and get used to developing in the framework
<7> so I don't need to use sprintf?
<6> dont use anything!!!!
<7> i just echoed the $db_query out again, the 145 is now hone
<7> gone*
<6> just the = will work just fine
<5> $query = 'SELECT FROM table WHERE username="' . quotesafe($user) . '" AND p***word="' . quotesafe($p***) . '"';
<2> bullrage: Do you understand what you've changed?
<6> TML, you should see all the syntax error I have had to fix
<2> I don't think you do
<2> jfarrell: heh
<8> are cl***es also part of global spectrum when ***igned?
<6> !+func printf
<8> like the ***ignee itslef
<9> int printf(string format [, mixed arg1 [, mixed ...]]): Output a formatted string
<2> Tarantulafudge: What?
<7> TML: I've changed printf to sprintf, but now that you guys have taught me that it isn't needed, I have now removed it.
<2> Tarantulafudge: "global spectrum"? ***igning clases?
<8> like, $blah = new blahBlah(); is $blah global?
<6> bullrage: and that should b e perfect
<2> Tarantulafudge: That's *INSTANCING* a cl***, not ***igning it.
<7> jfarrell: Yes, it now works. Thank You.
<8> TML: samet hing
<5> sprintf has its uses, but I find just using concatenation easier to read and easier to use.
<2> Tarantulafudge: No, not even remotely close
<2> You can't ***ign a cl***
<6> ***ignemnt generally creates a reference to said cl***
<2> Tarantulafudge: And "$blah" would created in whatever scope "$blah = new blahBlah();" is written in
<8> TML: well, from code it looks as if your ***igning it
<8> TML: thats how I refer to it
<6> in PHP5 anyway, in PHP4 its a copy, i do believe
<2> Tarantulafudge: You're ***igning the result of the operator "new"
<2> Tarantulafudge: Don't refer to it that way anymore. Not only is it wrong, it's confusing.
<8> lol
<8> so
<8> is it global or not like a function would be
<2> "$blah" would created in whatever scope "$blah = new blahBlah();" is written in



<10> hey, using php's xml dom, how do you copy a node from one doc to another?
<8> TML: so its not global?
<2> Tarantulafudge: Sure, if you're in the global scope.
<2> nym: You get a copy of the node in a variable and use appendChild() to add it where you want it.
<10> ok
<10> that's what i was trying originally
<2> nym: And that's true for *any* DOM, not just PHP's. :)
<8> TML: i mean like a function, since they are truley global to everything in the spectrum
<8> truly*
<11> please , test this script and tell me if there is bug http://prdownloads.sourceforge.net/viet-php-tools/viet-mysql-admin.zip?download
<2> DOM is DOM is DOM is DOM is DOM is DOM is DOM
<11> hi all
<6> so TML, i went to the campus this morning to speak with some officials and then to work out at the gym
<6> starting feeling sick, so i went to the campus health center
<12> TML: Except when it's not.
<2> Tarantulafudge: That's not true
<10> i'm getthing this error though: Fatal error: Uncaught exception 'DOMException' with message 'Wrong Document Error' in /var/www/infog/vidFeeder.php:192 Stack trace: #0 /var/www/infog/vidFeeder.php(192): DOMNode->appendChild(Object(DOMElement)) #1 /var/www/infog/vidFeeder.php(356): vidFeeder->update() #2 {main} thrown in /var/www/infog/vidFeeder.php on line 192
<6> turns out i have ... problems in my ear and throat
<8> TML: is it as global as a funciton is
<2> Tarantulafudge: functions can be created in a scope that is non-global as well
<8> TML: declared at top level
<10> that's what made me think i needed something special to copy between documents
<12> nym: See cloneNode and/or importNode (Don't remember which is pertinent)
<8> funciton*
<8> lmao
<8> function*
<10> mattmcc: oh, that might do it
<2> Tarantulafudge: "$blah" is just a variable. It uses the same variable scoping rules as any other type of variable.
<8> TML: ok, so it needs to be globaled in a function, thanks
<2> mattmcc: right...except when it's not. =)
<2> Tarantulafudge: Additionally, you might want to reconsider your use of the word "spectrum", as that doesn't mean anything to anyone but you.
<2> I think you mean "scope"
<8> TML: yea, scope spectrum, same difference
<8> lol
<13> if i have $this->var1 ="foo" in function A, can function B ( defined in the same cl*** as A call $this->var1 ?
<2> Tarantulafudge: No, there's a difference. "scope" means something to PHP programmers. "spectrum" means something only to you.
<10> TML: at least he gets a point for creatitivity, even if it is confusing to everyone else
<2> ruckerz: TIAS
<2> nym: I give no points for creativity
<13> TML: TIAS?
<10> TML: well he gets -1 point for being confusing ;)
<2> !+TIAS
<9> [TIAS] Try It And See. If you want to know if or how something works, try it first.
<8> TML: so now I'm neutral
<13> TML: should i call a global $this->var1 in function B first?
<8> TML: or false, if you wanna get technical
<0> about problem: Transfer-Encoding: chunked is the issue
<2> ruckerz: Are you trying to use OOP?
<13> TML: yep
<2> ruckerz: Then how about checking the documentation on OOP to see how it works? php.net/oop
<2> !+G11
<9> Guideline #11) ##php is a manual supplement. Read the manual FIRST, If after reading the manual you still have difficulties, then you are welcome to ask questions in ##php
<14> just wondering, does/can textmate send content to the pastebin @ hashphp.org as it does for others?
<2> jonbaer: Textmate?
<13> TML: Parse error: syntax error, unexpected T_OBJECT_OPERATOR, when i global $this->var1 in a different function
<2> ruckerz: You didn't RTFM. Please RTFM. php.net/oop
<14> http://macromates.com/
<2> jonbaer: A text editor?
<15> global $this->var, omg
<2> colder: That's not going to help him. He clearly doesn't even have a rudimentary understanding of OOP.
<14> yeah it has macros for pastebins but just started using it for php vs. zend studio
<15> yep, looks like he doesn't
<2> jonbaer: You'd probably need to ask on a "textmate" channel, then.
<16> Using ereg() or preg_match(), how do I get more than one result for the matches?
<14> good idea, my bad, thanks
<16> For instance, if a pattern has multiple matches in a string, how do I get each match into a different key in the array?
<15> GaryKing, use preg_match_all
<2> GaryKing: preg_match_all
<16> Thanks
<17> hello folks
<1> woof
<18> Shaba1 ***hole!


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#dns
#perl
#perl
ubuntu ext2 turn journaling on
ubuntu cluster telnet
#debian
ubuntu ppp winxp null modem cable
#physics
dvd bad sectors linux
mooies on DALnet



Home  |  disclaimer  |  contact  |  submit quotes