@# 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



Comments:

<0> I'm guessing preg_replace - but I can't use regex to safe my life
<1> Andy298: well I'm not exactly sure on what it expects as an input
<2> davey`: thanks, perfect answer :)
<3> lietu: same here you can use "last friday" as an input but i have got a full date
<2> davey`: i'm installing xdebug2 now.
<1> try for example 12 Dec 1994
<3> ok
<1> that's what I read on a "Date Input Formats" site that php.net had a link to
<4> hi
<4> I want to know if i can get the name of table, with php. Not only the content, but the name too
<5> hello - how can i set select a range of values in mysql? SELECT * FROM table WHERE field1 BETWEEN 1 AND 10 is not working like i want :(
<1> Andy298: also seems like 1994-12-12 would work, as in YYYY-DD-MM
<6> Zmanu: name of what table
<7> ...WHERE field1 >= 1 AND field1 <= 10;
<5> oh cool thanks!
<6> phatbyte: well then how do you want it?



<7> There's a way to do it with between but I can't remember.
<6> if field1 is a numeric type then BETWEEN is the same thing
<8> bobnormal: why thank you :)
<5> numeric type so the field type should be int?
<0> Using preg_replace, how would I turn "[09:17] #lobby: mode change '+v AppliedLog' by giggsey!~joshua@networkadmin.appliedirc.com" into "[09:17] giggsey sets +v on AppliedLog" (which is part of an array)
<7> Don't ask more than once, giggsey, it's irritating.
<0> ok
<4> example i have a table create with create table (ID int(4) not null primary key, name varchr(254) not null, surname varchar(254) not null) and in php, i do a query select name, surname from table and when i do mysql_fetch_array() i want to write echo "name : $resul[0] <br> surname : $resul[1] .... but i want do that on table where i don't know what is inside (name, surname) is it possible ? and is it clear what i say
<6> phatbyte: doens't matter, but not a char. a chare will parse the numbers one character a time, so 10 would be bewteen 1 and 2
<0> Zmanu: you want to get whatever is in the table, without knowing the column names?
<4> giggsey: i want the name of column inside mysql
<6> giggsey: we are not a regex help channel
<4> to write name of column and content
<6> Zmanu: there's a mysql_ function to get the field names in your result
<0> ||cw: #regex exists *gasp* - thanks :D
<4> ||cw: ok thanks, gonna have a look, because i don't yet find it
<6> Zmanu: then you didn't look very hard. just reading the list of functions shows "mysql_field_name"
<4> thanks and sorry to have so bad eyes
<5> ||cw whats if theres a $2000 or something like that in the field
<6> phatbyte: then you have a poor database desing and can't do what you want
<5> :)
<6> phatbyte: money is still just a numbe, the fact that it is money is to be dealt with on the client side
<7> Doesn't mysql have a (probably awful) currency type?
<6> currency marks have place on money data in the database
<6> FauxFaux: a lot of langs have a currency type, but it's just a low precision float
<6> like 4 decimal places or something
<5> ||cw hm ok thanks for help i will try..
<9> hello all. not sure what my problem is, but i think it's PHP's fault, so let me ask here.
<9> i am trying to create a simple BBCode parser using regexes. but the output it produces is just filled with seemingly random tags. i am putting the code online, link is coming in a second
<10> hello there, I'm using some ftp functions to sync two server together. The problem is, as soon as the sync takes longer than 120 seconds, I get an error. Anyone knows what could cause a problem? After 120 seconds, in firefox, a Save as ... dialog box pops open.
<9> http://rafb.net/paste/results/xiMMDG70.html <-- that's the code, it started misbehaving after i added the arrays and preg_replacing
<10> http://pastebin.com/646048 <-- that's the FTP cl***.
<11> RoySmeding: try escaping the brackets (if that is what you intend)
<9> oh of course
<9> that was indeed needed
<9> thanks
<11> np ;)
<9> works like a charm now
<12> Silly question: is it possible to POST a form and make it submit to a popup window ??
<13> hi! is it possible to read session-varibales if i
<9> argh Windows won't let me create a .htaccess file
<13> 'm not the owner of a site?
<9> this is why i want my own computer back >.<
<13> i mean: querying them remotely
<14> Thlayli_: Yes.
<13> ah, nice. where can i get information on this?
<13> i was googling a bit but only found garbage
<14> p_mash: Using javascript, sure.
<12> Thlayli_: $_SESSION['value']
<12> to POST,, not GET ??
<13> yes, but the session is not on my server
<14> Thlayli_: Create a file that has phpinfo(); in it, and you will see what you have access to.
<13> so i can't read them within a script from another machine
<12> Thlayli_: which server is it on then ?? A SESSION is generally a session on a DOMAIN
<13> i know
<13> that's why i've been asking
<6> p_mash: if your browser honors the target=_new option on the form tag, yes
<14> You cannot read a session on another machine, no.
<13> ok
<13> that's what i wanted to hear
<14> p_mash: Or that, :P _blank might also work.



<14> I personally think it is good that one cannot read a session on another server, speaking from a security standpoint.
<14> (sigh) cURL is going to annoy me.
<13> yes, true.
<12> kennebel: but i want a pouip with no title bar etc.. Just I'm gonna have to sdo wthi sin JS.. although I want to submit !
<12> p_mash: oops .. sticky keys !!
<14> p_mash: you can still cause a submit to happen with javascript, and yes, that is the only way you can control the window look.
<15> Anyone know how to make a database of links as well as ***ociated keywords/short descriptions that can be put in a bookmark database via a usable web interface?
<16> you might check freshmeat.net jbrimble.
<17> using error_log() is it required to have sendmail like with the mail() function or will it just connect to the local smtp service and email it?
<11> jbrimble: http://del.icio.us/
<11> ;)
<18> What is the diference between $cl***->function(); and cl***::function(); ??
<14> aarkerio: One is calling a specific instance of "cl***", the other it is a static call to the function contained in "cl***".
<19> i'm building a simple search function. i want users to be able to search all the fields of a table in mysql, and have rows returned in which any field contains a match. so far i have: WHERE INSTR(field_name, '$query') but this is limited to one field. how can i specify all fields?
<14> aarkerio: For the first you need a variable defined, for the second you do not. Not sure what the rules are in this channel are relating to teaching the basics of OOP.
<20> aarkerio: http://www.php.net/manual/en/language.oop.php ... start reading.
<11> slicslak: do a preliminary select query to gather all field names... then build your select on that
<17> how can i get the error messages of a failed piece of code in a variable? for example, say i trie to move a file to a non existant directory and php errored out and displayed the error in the browser, i would like to get that info and log it to a custom file for this particular script.
<20> slicslak: If you're using MySQL, look at fulltext indexing.
<21> slicslak: probably with OR
<17> *tried
<18> thanks!
<20> slicslak: And the MATCH() ... AGAINST() functions.
<14> jp-: http://us2.php.net/manual/en/function.set-error-handler.php
<21> jp-: you can turn on track_errors
<19> thanks Elazar i'll check it out
<17> found what i needed. thanks.
<22> hi
<22> !K3K
<22> i wanna mach everything between {{{ }}} in a string .... can someone help me of with that simple regex?
<23> is there something like aggregate database?
<23> like, enable aggregate db or something
<20> K3K: Curly braces are used to indicate pattern instance quantities. You'll have to escape them with a slash.
<21> glen_quagmire: that sounds like a database question
<20> K3K: At least, I think you have to. Try it and see.
<22> elazar: yeah but i dont know the regex ... preg_match_all( 'what_shall_i_write_here' .. ) ?
<20> K3K: So go read the preg docs... that's what they're for.
<22> \{{{\(.*?)\}}}\ ?
<19> Elazar, thanks for the help, MATCH() and AGAINST() functions worked perfectly
<22> elazar: you dont get it, i need once in my lifetime that simple thing....u think im reading 4hours ?
<20> K3K: It seriously looks like you need to read the docs.
<20> slicslak: NP. :)
<22> it seriously looks like you are a ****head ....
<21> !tell K3K about fish
<24> K3K: it seriously looks like you need to shut your mouth and read the documentation
<22> u are his son or what?
<21> K3K: you could always ask on rentacoder.com if you don't feel like doing it yourself
<22> stop kidding ..
<20> K3K: We don't support packages and we don't write PHP for you. We help you write PHP.
<21> K3K: at this point, no one will help you here.
<24> K3K: I'm another person that agrees with Elazar that you should read the docs to understand what to do. it won't take you 4 hours to find a simple regex pattern that you need
<25> K3K: if (($open = strpos($string, '{{{')) !== false && ($close = strpos($string, '}}}', $close)) !== false) { $contents = substr($string, $open + 3, $close - 3); }
<20> K3K: In short, we don't help people who are obviously too lazy to read the docs.
<25> I'd say you wouldn't need a regex.
<20> kuja: Well, there are an infinite number of ways to do just about anything. ;)
<20> kuja: It's just a question of what's easiest to code versus what is most efficient.
<21> TML: thanks :)
<0> I currently have $line = preg_replace("/\#(.+?) mode change \'(.+?) (.+?)\' by (.+?)\!(.+?)\@(.+?)\.(.+?)\.(.+?)/is",'$4 sets $2 on $3',$line); which is giving [14:04] skenmy sets +v on giggseyom from $line - I need it to get rid of om
<25> K3K: php.net/strpos, php.net/substr -- All you need.
<26> can i execute a shell cmd with php?
<27> pm_: php.net/exec
<26> thanks
<27> giggsey: You "need it to get rid of om"??
<0> yes
<25> "om"?
<0> Orginal line: [14:04] #lobby: mode change '+v giggsey' by skenmy!~skenmy@networkadmin.appliedirc.com
<0> I've used my regex to change it, but 'om' won't go
<21> giggsey: you always need to replace giggseyom with giggsey?
<0> CryWofl: It can be for any user though - so I need it in the regex - and not str_replace 'om'
<23> CryWolf, someone asked me what's the difference when you enable aggregate db or not..etc..i dont' remember exactly
<21> glen_quagmire: that doesn't sound like a php question, though. You should ask in the channel for whatever database that's for.
<23> ok thanks
<21> giggsey: shouldn't you be including "om" in your search so you can exclude it in the replace?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

udev a55
XF86AudioMute KDE
#css
#suse
#web
#python
config_12c
#php
#perl
file in a dictionary with urllib



Home  |  disclaimer  |  contact  |  submit quotes