| |
| |
| |
|
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
Comments:
<0> personally I can't stand asp.net.. the syntax messes up my head <1> I've got a MySQL question: is it possible in PHP to continue to run MySQL queries against a result set instead of against the db? <2> for another, there's no standard .NET interpreter for the *nix platform, anyway.. Novell and the *nix community are still battling out footholds. <0> php is so clean and fresh <3> but i think that, say, take c# -- it cuts out a lot of the complexities inherent in C++ and lets you focuse entierly on business/"non-accidental" logic (accidental in the arristotle language) <2> and to boot, SUN's jumped into the mix. <1> (Sorry to break up a nice .Net bashing session) <0> java on the other hand <4> dont apologize, take it to #offtopic <1> but #offtopic doesn't know the answer to my question :-) <0> ask <1> I've got a MySQL question: is it possible in PHP to continue to run MySQL queries against a result set instead of against the db? <5> drewbono: you could use temporary tables, I think. <3> yes! i totally agree with that. It's so frustrating trying to develop .Net **** on a windows platform. windows simply doesn't have the rich set of tools... <6> drewbono: or a join or a having clause <3> although the new "microsoft shell" is _very_ innovative :)
<0> or just modify your query based on the result <7> neither of which qualify as 'not against the db' though ... <1> Yeah, I'm trying to save my db from being hammered. <7> sounds like you're looking for coldfusion-esque 'query of a query' <3> yeah, it's like, can you query in-memory data in php? <1> Exactly. <7> not sure php has an equiv <3> in .NET, you would use LINQ. :) <8> is it safe to use cookies for critical data (where pages depend on this data) or are sessions better? <3> (sorry) <8> the information doesn't need to be secure <8> it just has to be there <1> ~lart .NET <8> safe meaning, if someone has cookies turned off they won't be able to work with my site <0> newpers_: if you're sure all clients have cookies on it's okay, but why not use sessions? <5> drewbono: how much data are you talking about? <8> lechunk: no reason. i'm debating between the two. <1> CryWolf: i's not significant -- less than 100 records <1> it's <3> if you have in-memory data you want to query, the specification pattern _may_ be an elegant solution. (hard to tell without knowing the circumstances, of course) <1> but for each record I have to then query all 100 again, and again <5> drewbono: how complex? ie, are you referencing only by a unique identifier, or searching by other fields? <0> pastebin some code maybe? <1> they're all hierarchical objects that have the same attributes, but I essentially have to query to find who is whose parent up to 4 or 5 levels deep and then display it all in a hierarchical and alphabetized fashion. <3> and you're storing them in memory as records with an implicit heirarchy? <9> anyone know what the highest int value possible in php is <1> if implicit hierarchy means that I simply have an attribute called "parent" which contains the unique ID, then yes. :-) <5> drewbono: once retrieved, are they accessed in sequential order or by other criteria? <1> CryWolf: Once I have a parent, I'd query for its children, and then its children's children, and so on until I'm done, at which point I'd go to the next top-level parent and do another iteration. <1> Unless there's a better way... <0> multidimensional arrays :) <0> fun <10> drewbono, you could use unions for your mysql selects if you know how many levels you're working with? <3> perhaps a recursive function that takes the entire set and a parent id? <1> ChugChug: explain <3> like OutputTree($all_nodes, $parent_id) <3> so it would output all nodes in $all_nodes whose parent_id is $parent_id, and recurse on each node that it outputs? <5> you could probably maintain an array of items, and a separate multidimensional array which contains the item heirarchies. <1> Hmmm... <3> function OutputTree($all_nodes, $parent_id) { foreach ($all_nodes as $node) { if ($node.ParentID == $parent_id) { OutputNode($node); OutputTree($all_nodes, $node.ParentID); } } <1> OutputTree would work for one parent_id, but again, I'd have to hit the DB each time I did it, right? <3> something like that. I can't think very well :) <1> i.e., for each parent <3> you'd query the DB once and build $all_nodes <1> ChugChug: that's a great suggestion. I'll give it a try and come crying back if I can't get it going. :-) <3> :) <3> there would be ways to optimize it, of course :) <0> pointers? <3> maybe -- i'm not a PHP language lawyer, so i havn't a clue :) <1> Me neither. <0> /jk <3> you can p*** by reference, right? <6> yeah <3> so like, OutputTree(&$all_nodes, $node.ParentID) ? <3> that way it avoids making a copy of $all_nodes? <3> i'm probably wrong... <3> does it not make a copy unless it needs to, iirc? <1> not sure <1> but that's probably the safest way to do it <3> yeah <3> well, i have to run. Gotta work in 6 hours! argh
<1> ChugChug: take care and thx again <3> drewbono - np -- i hope it works! <3> have a good one, all!! <11> cansomeone please take a look into that -> http://pastebin.com/547905 <6> night <12> is there a way to get the memory address of a string/variable? <6> just for my own curiousity - why cube? why not use a reference? <12> I'd like to setup a hash table so to speak of variables p***ed to a function... ie. function x(& $var) { $memory_address = mem_address($var) if (empty($array_of_addresses[$memory_address])) $array_of_addresses[$memory_address] = TRUE; } or something like that <12> lig, I want to see if a variable has been p***ed to a function already.. if it has, do one thing.. if it hasn't, do another... (dealing w/ functions inside loops) <0> if (isset($var)) {} else {} <0> cube:^ <12> lechunk, that won't work... $var will always be set <12> because I'm p***ing $var <13> woohoo! <0> well done jcarr <11> lig, did you understand my example?? <8> is it bad practice to use a subdirectory/uri as a variable. like if i have http://www.somedomain.com/az/ and then parse the domain so $foo = 'az' and then perform a query WHERE ABBR=$foo <6> ccenoura: think so - going back to look again <11> ok, thanks <11> lig, have in mind the way it is now it shows the file_name dimmed but only once. when the user presses submit more than once the file name goes away. <6> newpers_: not as far as I know - just be careful and validate it carefully <8> thanks <13> lechunk, my ****ty job ends tomorrow ;) <0> woohoo <0> :) <6> for better job I hope jcarr <11> cube, read this please -> http://www.governmentsecurity.org/articles/IntroductiontoBufferOverflow.php <0> jcarr: what do you do in the ****ty job? <13> write php code by myself <0> hehe.. fun <13> well, it pays **** <0> small company? <13> $13/hour <13> the next job pays $48/yearly, three week paid vacation, $2000 sign on bonus, etc <13> $48k that is <0> hey, beats mcjob <0> that's pretty good <12> ok <12> came up w/ my example <12> http://pastebin.com/547956 <13> Jymmm, services rendered, like on rentacoder.com? <14> jcarr More like BunnyRanch.com <13> "Build me the next ebay, ***ign all copyrigts to me. I'm no coder, but it seems simply and should be done in about a week. I'll pay $100." <12> I'm trying to create a database object cl*** that will be able to handle multiple queries w/ a single object (not have their result sets stepped over) as I mentioned above <13> "Oh... and it MUST BE PERFECT WITH NO BUGS" <6> ccenoura: Hmm - think you have a logic error... the second time the form is submitted there are no errors and you don't p*** it the $values array - you send it the post array... the displaform uses the values array <12> ccenoura, didn't see anything about PHP there dude <13> cube, that is no real object :( <13> dude, wtf <12> lol I know.. free hand ;) <11> cube, well, i thought it would be usefull <11> lig, how can i solve that? <0> for <12> im trying to "demonstrate" what I mean <13> -1 for the cl*** name <13> -1 for the variables <12> here.. <13> -10 for the non descriptive methods <0> more like -10 for that cl***name <13> and -100 for the external dependencies <13> finally, -infinity for not being object oriented ;) <12> http://pastebin.com/547963 <10> that code made me O.o <6> ccenoura: rethink your logic... <12> I was just trying to demonstrade <11> lig, :) <13> You should implement query object... I have never seen someone implement it in php
Return to
#php or Go to some related
logs:
/etc/x11/x is not executable ubuntu linux cowon a2 cowon_a2_bsp_source.tar.gz fat: codepage cp437 not found cdrecord filetable #gentoo configuring XAnalogTV sudo service php gimp bucket fill won't work
kubuntu VT8251 + rhel
|
|