IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-05-30
[20:04]<gyzra>yup
[20:04]<mjgcnd_2>cool, thanks :)
[20:05]<gyzra>and if you know perl regular expressions then you should use preg_split over split (faster, more powerful)
[20:06]<mjgcnd_2>by regular expressions, you mean string matching stuff like ^\d*
[20:06]<gyzra>yup
[20:06]<mjgcnd_2>cool
[20:06]<mjgcnd_2>thanks
[20:06]<nkjw>Say I have an associated array $A. If I do $x = array_shift($A), $x will only hold the value of the first element in $A right? The key is lost right?
[20:07]<nkjw>*associative
[20:10]<gyzra>CBTC: if you have to create a new database each time a form is submitted, you should stay away from databases until you understand them better
[20:20]<pzggjgg1000>And they're the actual documentation at php.net.
[20:20]<||aw>CBTC: if not, I won't help you create such madness
[20:20]<gyzra>lol
[20:20]<cbtc>||cw: the user will have access to **some** of the db as some things will need to be changed on a on-going basis by the user
[20:21]<cbtc>||cw: this will be done thru a simple html file that updates the db tables inside *their* own db
[20:21]<||aw>CBTC: but are they creating tables or just adding data?
[20:21]<||aw>man, that's ineffient and sloppy
[20:22]<||aw>you just need to add the userid to the data row to define who owns that row of data
[20:22]<cbtc>||cw: at this time I don't think they will be creating their own tables, no... but this could be something I am asked of later, why not make it available now... know what I mean
[20:22]<||aw>because it doesn't scale, you'll top out at a couple thousand users even on high end hardware
[20:23]<cbtc>ohhhh
[20:23]<||aw>db's have indexes for a reason, that's how you can scale to billions of rows of data
[20:24]<cbtc>||cw: well at this time there is 212 users
[20:24]<||aw>split that data up into seperate databases and your index are not availbale
[20:25]<cbtc>ok so then, would it be apropo to have the form then create a new table each time based on a specific about the user....
[20:25]<||aw>seems like a simple relational model will work for you, but if htere realy is need for seperate db's, mysql.com will have the commands to create db's. good luck with the headaches fo managing that many db's though
[20:26]<||aw>CBTC: find a guide on ralational data desing
[20:26]<cbtc>in that maybe I should find a simpler way to seperate them inside the same db
[20:26]<cbtc>||cw: thanks, good info
[20:28]<mzzvygfc>argh this is the bain of my life
[20:29]<mjs000>anyone regexp gurus ? "@^\d+\([ \t]*,[ \t]*\d+\)*@" to match decimals separated by comas
[20:29]<zgygm>I'm trying to open a CSV file in excel that i created with php. the problem is that there are square symbols befor each line break? my guess is this has something to do with unix/dos line endings? is there a solution for this using php
[20:29]<zgygm>.. the line endings inside quoted fields i mean
[20:33]<qu2n>reind, I print out the text files using TAB-separated and \n as a newline, they opne fine in excel
[20:33]<vfnv>reind: are you using \r\n to end lines? Probably only want \n
[20:33]<snvzzm>if i touch a file, and then rename it, the rename undoes my touch
[20:34]<snvzzm>anyone know how to stop that from happening?
[20:34]<zgygm>Thanks Qube , Vlet
[20:40]<vfnv>hmm... maybe try using shell_exec instead :)
[20:40]<qu2n>sevard, that sounds impossible
[20:40]<qu2n>unless php stat was caching the details
[20:40]<snvzzm>there must be another way around this, the script is working fine lots of other places
[21:10]<fndzjf>JoeJoe: have You any idea where I can look for help? I allready try to comp.lang.php and pl.comp.lang.php
[21:10]<fndzjf>?
[21:10]<fndzjf>Maybe here in another time..?
[22:21]<pdznpfd_>hey
[22:21]<pdznpfd_>what's the best way to split a string by all whitespace and newlines?
[22:22]<pdznpfd_>preg_split?
[22:22]<drvvdaa>Probably.
[22:22]<pdznpfd_>how would i go about constructing such a regex?
[22:22]<rzzrjdfn>firefly: Read the docs!
[22:22]<mjjfs>firefly_: www.regularexpressions.info is the best site for regex tutorials i've ever seen
[22:22]<pdznpfd_>thanks!
[22:22]<rzzrjdfn>firefly: "Tip: If you don't need the power of regular expressions, you can choose faster..."
[22:23]<pdznpfd_>Gargoyle, how can i do that without regular expressions?
[22:30]<pdznpfd_>by " "?
[22:30]<mjjfs>firefly_: tab
[22:30]<njdycjs>firefly_, TIAS :-)
[22:30]<amnnf>i am using php gd to apply some filters on images, but it loses alot of quality
[22:30]<amnnf>how can i prevent that
[22:30]<rzzrjdfn>firefly: That file looks like tab delimited to me
[22:30]<pdznpfd_>okay
[22:30]<njdycjs>Adeel, save as higher quality?
[22:30]<pdznpfd_>what's the representation for a tab? anyone know?
[22:31]<rzzrjdfn>\t
[22:31]<njdycjs>"\t"
[22:31]<mjjfs>firefly_: i don't know what you'd write, explode("\t",$line) maybe?
[22:31]<pdznpfd_>ok cool
[22:31]<mjjfs>there we go
[22:31]<pdznpfd_>thanks everyone
[22:31]<pdznpfd_>^_^
[22:31]<rlurrsnw7_w79>is 'if $password == $password_again { }' the correct syntax to compair password and password_again?
[22:32]<amnnf>also some hebrew characters are being inserted into the image in reverse order
[22:32]<amnnf>using gd
[22:32]<amnnf>why is that
[22:32]<gmmygsvjgg>how can I do logout from http auth?
[22:32]<slumsn_>hello
[22:32]<drvvdaa>eddiestone: The short answer is you can't. Browsers don't implement a useful way.
[22:32]<njdycjs>CLucas916_x64, add () around the comparison bit
[22:33]<rlurrsnw7_w79>k
[22:33]<rlurrsnw7_w79>thanks
[22:33]<slumsn_>what is the fastest way to do change all the occurence of " href='anythinghere' " in a string to
[22:33]<slumsn_>" href='#' " ?
[22:33]<njdycjs>regex, but don't ask me for the pattern ;-)
[22:33]<gmmygsvjgg>mattmcc, that is what I was affraid from... thanks
[22:33]<mjjfs>mattmcc: can't you do $_SERVER['HTTP_AUTH_USER'] = ''?
[22:33]<tml>eddiestone: You can send a 401 header, which convinces the browser they're not logged in anymore.
[22:33]<slumsn_>Nomikos, I can do regex, but I was wondering if there is anything faster
[22:34]<tml>dools: That doesn't persist.
[22:34]<drvvdaa>dools: Sure. It won't affect the next script instance, but you're welcome to do it.. :)
[22:34]<njdycjs>spudse_, if anythinghere is variable, not really afaik
[22:34]<gmmygsvjgg>TML, I will try thanks
[22:34]<mjjfs>mattmcc, TML: ahh, i see
[22:34]<slumsn_>Nomikos, anthinghere is indeed variable
[22:34]<tml>eddiestone: mattmcc's point is that it just re-prompts them for u/p
[22:34]<njdycjs>spudse_, though you can always abuse substr and strpos
[22:34]<slumsn_>Nomikos, thanks
[22:34]<tml>eddiestone: Which can confuse some people.
[22:34]<slumsn_>Nomikos, I doubt that would be faster







