| |
| |
| |
|
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
Comments:
<0> hi <0> i have a SQL query forming questions <0> err <0> question :) <1> just ask it <1> already <1> jeez <0> Touqen: im typing :P <2> Might I recommend longer sentances <0> anyway, i have a series of checkboxes that set wether or not $foo is part of the SQL query. <0> Now the problem is SQL syntax <0> if date is all I want to return, i dont need commas <0> if I need dates followed by other stuff, I do <0> of course, you could do it with nested ifs <0> but i was just wondering if there was a nicer way. <1> $comma = ''; $sql .= $comma . 'date = ...'
<1> ; <3> one way is to put all your fields in an array and join them on "," to make your field list <1> $comma = ','; <1> That works too. <3> I do the same thing with conditions, add each condistion to an array and join on " AND " <3> for custom search page <0> ||cw: ok, ill try your method <0> ||cw: thanks in advance <4> anyone know how to set IE as default browser, I need it to test something quickly <5> o k <6> MikeH, on your computer? <4> nm <7> Hey guys I have a question. Im not sure its even possible but I have a script that databases phone numbers and names for a recruiting company and they would like for phone numbers to be links that when they click on the link their ***igned voip will dial that number <6> $s = preg_match("/http:\/\/(google|yahoo)\.com/","\1",$s); <-- how can i change that so that $s will have the value of either "yahoo" or "google" depending on which one is matched? <8> redduck666: have you looked at the contents of $s? <6> CryWolf, $s is "http://google.com" <8> redduck666: try preg_match_all <9> do constructors and destructors have visibility? <6> CryWolf, even with preg_match_all the value of $s is 0 <10> is there a constant which has the directory seperating character / on *nix \ on win32 for instnace. There's a constant which tellst he OS but this would be better. <8> redduck666: are you using $s to hold the return value or the matches? <11> EricCartman-iBoo: PHP doesn't care, if there is / or \ in path... <9> like private __construct () {} ? <10> is there a sepecial function to concatanate path names etc ? <6> CryWolf, i am afraid i don`t understand the question: http://pastebin.com/534143 <8> redduck666: you're using the same variable in two different ways in the same place. <8> redduck666: that does not work. <8> redduck666: you might want to try reading php.net/preg_match_all <12> how i can make this a vector? -> $things= "net,rede,zero'" <13> bizarre problem: http://bianchi.no-ip.net/chris/tekdesk/ i'll post page.inc.php to pastebin <10> freebox, split/explode <6> CryWolf, man i am soooooooooooo stupid <6> i was using preg_match whhile i thought i was using preg_replace <13> hehe, nevermind, i found it <6> CryWolf, sorry for wasting your time :-) <8> freebox: define vector <10> it's a surprise that this channel is horridly not efficient with such a population <12> EricCartman-iBoo: k <13> EricCartman-iBoo why is that a supprise? i think that it's especially efficient -because- of the population :) <13> *not efficient* <10> efficiency is the more output with less source <14> Question: I want to "fopen" a remote location, but I need to post the variable "name" too. How do I do dat? <13> EricCartman-iBoo and since we have more source (aka population) you would expect that much more output? <4> anyone here stress test their web apps? <13> MikeH usually, depends on what i need to do with it <8> MikeH: yes. if the test works, I'm not stressed. <4> b1n0ry: what do you use to do it? <15> Heh. Just on MTV: "I'm going to have the coolest party, there won't be nerds there, just cool people!" <13> MikeH: a lot of users, multiple-processor PCs, and many browser sessions :) <15> Well pardon me. <4> I've tried ms WAS and it crashes, just about to try Jmeter <16> HolyGoat pm? <15> Jymmm: sure <13> HolyGoat - "cool" is in the eye of the beholder <10> b1n0ry, yes einstein ;) <11> HolyGoat: Sounds very nerdy to me :) <13> EricCartman-iBoo: but most of this source is bloatware :) <14> Question: I want to "fopen" a remote webpage, but I need to post a variable to page for it to download correctly. Help? :) <11> curl() <11> Erm... php.net/curl <14> Stormchaser: Your post to me, right? :)
<15> Stormchaser: I might send them a nerdy letter. <13> i'm sure the point is moot, but if used heavily, which is more efficient: echo '<title>'.$title.'</title>' or echo "<title>$title</title>" performance-wise? <13> i don't know how much overhead there is with the concatenation operator <14> TY Stormchaser <11> HolyGoat: :) <11> b1n0ry: Oh, and s/beholder/beer holder :) <13> Stormchaser: :) <13> even i can be cool if you're drunk enough <11> b1n0ry: ...not to mention that that doesn't happen ;) <13> hehe <17> :q all, where can I find formal grammar for PHP? google didn't help me. <13> www.php.net? <17> sources have flex-generated parser, but source grammar is not included into php tarball <11> 'formal grammar'? uh? <17> Stormchaser, I need it for syntax analyser <11> you mean the .lexer files? <17> I think, something like that can help me. <18> someone can explain to me how does sapi_module_struct->activate & deactivate work Utility ? <11> darkk: Urm... You'd probably be best of asking Pollita or TML on that... When they are around... <13> heh, i must be uber-lazy. i wrote a function that appends a "\n" to the end of my output lines called html, function html($string) { print "$string\n"; } <13> of course, until i type html('some text'); i might as well just type echo "some text\n"; <13> i'll save a few more characters by calling the function 'o' <13> there: function o($string) { print "$string\n"; } how lazy is that? <4> hrm <4> when opening a mysql connection <19> You're actually typing the exact same amount of characters though. <4> should I be closing it when I finnish <4> and what are the results of not closing it? <13> Julian|Work: nope echo "text\n"; = 14 chars o('text'); = 10 chars <11> lol <13> and if i use it 10 times, i save more characters than the function took to declare :) smaller code and looks nicer without the escaped \n after each line <13> called it 'o' for 'output' <4> b1n0ry: you could ofcourse just do o "test"; which is 9 :P <20> i wonder the overhead of calling a function <20> nicer but slower <11> MikeH: no, you can't do that <13> MikeH: nope, doesn't work on function calls <13> MikeH: although i may recompile php from source and include the 'o' capability :) <11> lol <13> an echo-like function that automatically appends a new-line could actually be handy <13> when generating html source, it looks a bit cleaner <21> I need to convert decimal number between english (1,234.50) and polish notation (1 234,50). Do you know any function, or PEAR package for that? <13> zimnyx: number_format() <21> b1n0ry: no way <22> can someone tell me what is wrong with this? -> preg_match("[0-9]*\.[0-9]{2}", $this->price) <22> php doesn't like the asterisk <13> zimnyx: just remove the comma first <22> Warning: preg_match(): Unknown modifier '*' <19> b1n0ry, I was thinking you'd have to "print o();" <8> dmar-_-_: you forgot the delimiters <19> b1n0ry, didn't realize my mistake, then I just shut up :P <23> hi <13> zimnyx: i.e. $polish_number = number_format(str_replace(',','',$english_number),2,',',' '); should do it for you <22> thanks <13> i know it looks like a lot of commas and apostrophes <23> Can anyone help me with sorting this ***ociative array on the i_ranking field: http://pastebin.com/534203 <13> the str_replace(',','',$english_number) strips the commas out of the english number making 1,234.56 into 1234.56, then number format is applied using a ',' as the decimal and a ' ' as the thousands separator <19> diederick_: usort() <23> oke thanx <13> zimnyx: specifying 2 decimal places <21> b1n0ry: thanks <21> I can;t make strtr to replace space.. <21> i'll use preg_replace <13> zimnyx: you're converting english to polish? <13> you can use str_replace() to replace a space <14> Stormchaser: <14> / grab URL and p*** it to the browser <14> curl_exec($ch); <11> *blink* <24> blarp <21> b1n0ry: polish to english, thanks <14> I need it to _not_ p*** directly to the browser :) <13> zimnyx: ok, so your english number is like 1,234.56 right? <23> Julian|Work: isn't there another function for this?
Return to
#php or Go to some related
logs:
phenex broadband Port 696 buubot help XORG7.0 ATI x700 xchat dalnet ubuntu #debian apache2 glibc detected error ubuntu tcl putchan install gentoo debugging symbols #php
|
|