| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9
Comments:
<0> hmmmm <0> http://www.theopensourcery.com/phpcommandline.htm <0> i think that what i am looking for.. <1> FazLeeeN: well you haven't really described what you're looking for <1> yes, php comes as a standalone binary <0> :/ i think i mentioned ActiveTCL unless you are not familiar with Active* softwares <0> so by using this standalone binary <0> i can test my code without using the browser right? <1> yes <1> rather <1> you can run php code without a webserver <1> and byp*** that whole thing <1> browser included, yes <0> sounds great <1> it's handy <0> yeah i have been needing that for a long time but i was lazy to look for it :<
<0> php 5.1.2.zip (for windows) should have that standalone binary right? <2> mind you, if the scripts are intended to be run by a webserver, many of the webserver specific features will not be available <2> yes, all distros should have one. should be php.exe for that one <0> yeah i intend to use those scripts as webpages but i'd like to test their functionalities first. using something like command line <3> question: I am returning all usernames in Table1, but I only want to return the users who have images in Table2 (they are linked by the field username). Does anyone know a better way to do this then a WHERE EXISTS subquery of selecting the images where usernames equal? <3> The subquery is taking WAY to long <3> my current SQL query is: SELECT * FROM models WHERE EXISTS ( SELECT username FROM models_images WHERE (models_images.username = models.username) AND (approved_tms > 0) LIMIT 1 ) ORDER BY RAND(1138216712); <1> ChillAxen: do you have an index on the username and /or approved_tms fields? <3> nope <3> username on models table is unqiue though <1> indexes help speed selects up very much <3> i have a index on field ID <1> ok, UNIQUE() uses an index <3> then yes =] <1> you don't need a subquery for this, just use a JOIN <3> i tried but couldnt get it to work <1> or actually, in mysql you can get away without even that <3> i was going LEFT JOIN models.username = models_images.username <4> anyone recall offhand where the dict file is on a linux machine? <3> how would I go about doing that? <1> limit 1? <1> evulish: /usr/share/dict? <4> hrm <1> ChillAxen: also you should be comparing ids, not usernames <3> cant do it that way <3> the info in my database is spidered <3> so its the easiest way to relate the two <1> so? keep a "dictionary" table of id -> name <3> because all the data is spidered prior to being added to database <1> so what? well, anyhow, that's up to you <0> thanks guys <3> the user table and all there iamges are spidered prior to addign to database <3> thus it dont have an ID <3> in essense, the username is actually it's ID <4> hrm <4> that wordlist is a bit complex <3> i just have an ID field for an autoincrement because I feel it's easier to look at <2> cmac66: i only gave you 3 minutes TOPS worth of repairs to make to your code. what's taking you so long? <3> theres really no need for the id field on table models <1> ChillAxen: you have a reason if you need to compare usernames across tables <3> pizza with a left join [SELECT * FROM `models` LEFT JOIN models_images on models.username = models_images.username] it returns all users with images... but then does does <3> such as if a user has 15 images <3> it returns the user 15 times <3> pizza you said the ID field <3> inside my table models, ID doesn't really matter because username is always unique <3> anyways, my problem is with a join i need to only return it once, not for every image with that username <5> ChillAxen, that's actually right <3> thats why i tried the subquery, but that was taking a rediculious amount of time <1> group by username <5> did you want it to do something else? <3> let me try the group <1> ChillAxen: select m.username from models m, models_images mi where m.username = mi.username order by rand(1234) limit 1; <3> techno: i just want it to return a username once, not multi times <3> pizza i want all usernames <3> not just the first <1> ok, so remove the limit <3> i did, 1 sec <1> ChillAxen: also, you'll want an index on the username field in the model_images table <1> which will take a large amount of diskspace, and which is why you should use user ids and not usernames, but it's your database <3> pizza I just said it's impossible <3> most of this data is spidered prior to being added to a database
<1> ChillAxen: you're wrong, of course. <1> relating an id to a username is far from impossible <3> not if i dont know the ID when inserting the image <1> spidering does not make having user ids impossible <1> so keep a table in-memory of username->id <1> or do an insert...select ... which would be slower <3> i mean i can set the model_image.model_id = (then query the ID) <3> but the mySQL data is being generated by a 3rd party program and stored to a mySQL file <3> so i can just m***ively update the database <3> 1 sec, let me get back to doing this <3> pizza: your query does same as mine, for every image that user has, it returns their username again <1> ok <1> ChillAxen: select m.username from models m, models_images mi where m.username = mi.username group by m.username order by rand(1234); <1> if you want to know how many images they have... <1> ChillAxen: select m.username, count(*) AS imgcnt from models m, models_images mi where m.username = mi.username group by m.username order by rand(1234); <6> how does this look? <3> pizza: group by is what I needed =] <3> thankyou <3> thanks =] <1> ChillAxen: you're welcome <6> $ch = curl_init("http://www.paypal.com"); <6> curl_setopt($ch, CURLOPT_HEADER, $header); <6> curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); <6> curl_setopt ($ch, CURLOPT_POST, 1); <6> curl_setopt ($ch, CURLOPT_POSTFIELDS, $req); <6> echo $result = curl_exec($ch); <1> cmac66: you're a curl prodigy <6> YEA! <6> so its good. <6> it will work. <1> what could possibly go wrong?! <6> everything <7> haha <4> fark. how do you match '3 or more times' in regex? <1> {3,} <4> ah <2> cmac66: nope <6> no? <6> Two-Bits: why? <2> did you address everything i ever so recently yelled at you for? <4> is the request url really just http://www.paypal.com? <4> don't they have a cgi-bin or anything? <2> <@Two-Bits> USE THE WHOLE ****ING URL IN THE INIT! <2> and don't paste in the ****ing channel <2> and i can't even see what you're still building into $header <7> Ya there is a cgi. He should probably be using the sandbox for testing as well. <2> <@Two-Bits> i yelled all three of those at you several times now. **** so much as ONE of those up and ask for help again, and you're gone. for a week <4> haha finally <4> honestly, curl isn't that complicated <4> it's been like 6 hours :P <1> some folks are less capable than others <1> curl actually is kind of a pita to get started <2> understandably so <2> but i told him 4 or 5 times, most of them yelling, to put the entire url in the curl_init. rather than ask for clarification if he didn't understand, he chose to ignore me. every. single. time <2> i dont care if he's stupid and doesn't get curl. i care that he's disregarding the help he is given repeatedly <1> fair enough <2> and given that trend, a week off would yeild the same progress <1> a friend of mine got out of a dui, he's going out drinking to celebrate. <2> heh, smack him for me <7> How did he get out of it? <8> rofl <1> his urine test came back and he was *just* under the legal limit <2> did he fail the breathalizer? <1> he must've peed into it <2> heh <9> jesus christ <9> you guys were still fighting with that idiot? <1> Two-Bits put him out of his misery. <4> not any more! <9> no <9> he put us out of his misery. <9> hehehe <1> haha
Return to
#php or Go to some related
logs:
#india #india www.kalp beutifol lier #allnitecafe van tu tri #photoshop #chat-world #worldchat #india
|
|