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: 1951.74 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-05-25
Pages: 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
Next >
[00:00]<nsgn>because i'm making one simple little script and dont really have the practical option to have it use a DB
[00:00]<tml>Stormchaser: I'm more of a hyper-realism guy. Misfile, Alpha-Shade
[00:00]<tml>NSGN: SQLite
[00:00]<zdzxzzmfdgzx>NSGN: Consider SQLite
[00:00]<tml>richardlynch: STFU
[00:00]<nsgn>hm...i have to say i'm not familiar
[00:00]<dzzznzdjusn>lol
[00:00]<svjzdzxzsnz>TML: what about vgcats? :)
[00:00]<tml>Riding my bandwagon. Who do you think you are, anyway?
[00:00]<jdddd>TML: Search The Funky Universe?
[00:01]<tml>Jymmm: Stop The F***ing Usurpation
[00:01]<nsgn>somebody mind giving me a nutshell idea of what it is?
[00:01]<tml>That's right, everyone get out your dictionary.
[00:01]<svjzdzxzsnz>NSGN: nope.
[00:01]<tml>NSGN: php.net/sqlite
[00:01]<dzzznzdjusn>Usurpation, what a funky a word
[00:01]<zzlzm>wow, what an ego
[00:02]<jdddd>TML: Fuck the dictionary, I'm looking for the online spoken .wav file!
[00:02]<dzzznzdjusn>LOL
[00:02]<tml>arpad: I'm fairly certain richardlynch knows I'm joking.
[00:02]<zzlzm>because sarcasm is renowned for travelling well over irc?
[00:02]<fusxuyrr>Jymmm: will .ape work too?
[00:02]<zdzxzzmfdgzx>NSGN: http://php.net/sqlite
[00:02]<jdddd>Ah, here we go... http://m-w.com/dictionary/Usurpation
[00:02]<tml>arpad: Because richardlynch has been here a lot before.
[00:03]<fusxuyrr>STUPID richardlynch
[00:03]<zdzxzzmfdgzx>Reading email and doing IRC at same time is Stupid, isn't it?
[00:03]<fusxuyrr>you are ultra-stupid :|
[00:03]<jdddd>Fushuing the only thing I have that uses the ext .ape onlt deals with CAD/CAM tyvm
[00:03]<fusxuyrr>your stupidness even amazes stupidity itself that it comitted suicide by slicing its throat off while jumping off a skyscraper
[00:04]<tml>arpad: It's not as if sarcasm is a personality trait I developed in the last 15 minutes.
[00:04]<drwj>thanks for all your help, goodbye
[00:04]<jdddd>TML 17.3424 minutes ago
[00:05]<nsgn>oh this is nice.... "Call to undefined function: sqlite_open()"
[00:06]<zdzxzzmfdgzx>NSGN: You'll have to compile it in (Un*x) or uncommont the sqlite line (Windows) -- and you have to be using recent version...
[00:06]<fyfcym>TML: sorry for the delay, but yes the query works perfectly
[00:06]<fyfcym>TML: oops
[00:06]<fyfcym>wrong person
[00:06]<zdzxzzmfdgzx>NSGN: If the file is relatively small, array_walk might be faster/easier
[00:07]<nsgn>richardlynch: the current server i'm tergeting is a virtual server, and i cant control what is compiled for it
[00:07]<nsgn>:-/
[00:07]<zdzxzzmfdgzx>NSGN: Yeah, just go with array_walk then, and be done with it.
[00:07]<nsgn>durn
[00:07]<nsgn>ok
[00:07]<fyfcym>TML: oh my bad right person, yeah the query works fine
[00:08]<nsgn>hm, i wouldnt be able to throw a wildcard in array_search...would i?
[00:08]<tml>lilkid: I didn't ask if the query worked
[00:08]<tml>lilkid: I asked if you've confirmed that it's actually arriving in that block of code
[00:08]<tml>lilkid: There are several branches right there
[00:09]<tml>lilkid: Before we debug the branch that runs the query, let's make ABSOLUTELY SURE that we're even getting INTO that branch
[00:09]<zdzxzzmfdgzx>NSGN: array_walk is gonna call a function with each element -- you can put the wildcard into the body of the function. I think you also get a bonus argument to pass in whatever you want.
[00:09]<kyddja>TML and arpad: Thanks again for your solutions.
[00:10]<nsgn>ah screwit, i just realized i can forget line returns and use implode/explode
[00:11]<jdddd>serialize()
[00:11]<fyfcym>TML: i made a new var $this->error = $row['userid']; when echo'ing it echo's the right value from the database.
[00:13]<zdzxzzmfdgzx>NSGN: Careful -- You want to watch out for "am" and "spam" as words... You'll want to be checking for word boundary with preg_match, and implode+preg might be more expensive than array_walk... Doubt it, but worth checking.
[00:13]<fyfcym>TML: let me just check as you said if its getting into that black
[00:15]<fyfcym>s/black/block
[00:16]<nsgn>richardlynch: maybe i'm dense...but whats wrong with those words?
[00:16]<zdzxzzmfdgzx>NSGN: Nothing, except it would be super easy to be looking for "am" and find "spam" after you implode the file contents.
[00:16]<nsgn>oh i see
[00:16]<nsgn>got ya
[00:16]<zdzxzzmfdgzx>NSGN: Been there, done that. :-)
[00:20]<fyfcym>TML: ok thanks for your help, accidently placed the else statement on the wrong if statement >.<
[00:21]<jjpnnzfnss>ok..im having trouble connecting to my sql database.. In cpanel my username is peerless so when I created the database it has the peerless_dbname as its name. And then I created a user, peerless_username is how it came out. So when i connect to the database..do i use (localhost,peerless_username,pass) or do I use (localhost,peerless,pass)
[00:21]<2uffzrrn>peerless_username
[00:22]<2uffzrrn>and select the database as peerless_dbname too
[00:22]<jjpnnzfnss>yea..thats what im doing
[00:22]<jjpnnzfnss>still not working
[00:22]<jjpnnzfnss>damn
[00:22]<jjpnnzfnss>for pass..i use the username pass i made..not my cpanel pass..right?
[00:22]<2uffzrrn>the password you made when creating peerless_username
[00:22]<jjpnnzfnss>yea.
[00:22]<jjpnnzfnss>everything seems right to me
[00:23]<jjpnnzfnss>the only thing i think that could be wrong is localhost
[00:23]<jjpnnzfnss>this is set up on a VPS server
[00:23]<jjpnnzfnss>and my peerless cpanel account is on a different ip then the main shared ip
[00:23]<jjpnnzfnss>is that why maybe?
[00:23]<yvzn2rf>JJPeerless: sounds like you should be reading cPanel documentation
[00:24]<svjzdzxzsnz>!+g10
[00:24]<lxl-2jv>Guideline #10) We don't support script(s). We help you *write* PHP, not recommend or download and install/hack/modify/adapt/use pre-written scripts
[00:24]<srdunf>anyone know if its possible to query mysql after executing a query to find out what the newly added primary key is?
[00:24]<zdzxzzmfdgzx>http://php.net/mysql_insert_id
[00:25]<jdddd>JJPeerless: You have been asked MANY times not to use the enter key as puncuation, please stop.
[00:25]<zdzxzzmfdgzx>JJPeerless: You may also want to examine the output of SELECT * from mysql.user -- and visit http://dev.mysql.com
[00:26]<raaca>btw, is it normal that each time you do a query you have to reopen the connection to the database? or is it normal to make connection open for a longer period? oO
[00:26]<zdzxzzmfdgzx>Rockj: One connection per script, or you'll kill performance badly.
[00:26]<2uffzrrn>blah, i've just knocked a whole kb and a lot of lines from my script using mysql_num_rows and mysql_fetch_row
[00:27]<raaca>richardlynch: hum, I'm wondering what im coding wrong then. Need to take a closer look on the mysql_* functions and how they work.
[00:27]<2uffzrrn>richardlynch: does that mean it would be easier to store the database connection in an include file, and just include that file to open a connection?
[00:28]<2uffzrrn>nevermind, stupid question
[00:28]<zdzxzzmfdgzx>Rockj: Pastebin your script, maybe we can spot it in seconds...
[00:28]<raaca>richardlynch: I have a database class and a user class. Ill pastebin it .. 2 sec.
[00:28]<zdzxzzmfdgzx>bullrage: Yes, and put the include file OUTSIDE the webtree to help protect MySQL password.
[00:29]<2uffzrrn>richardlynch: Any other suggestable places to store it?
[00:30]<svjzdzxzsnz>bullrage: Any other database.
[00:30]<svjzdzxzsnz>urf... nm
[00:30]<zdzxzzmfdgzx>bullrage: In root-read-only httpd.conf, but then never ever dump out $_ENV or use phpinfo() ...







