Jump to content

Azu

Members
  • Posts

    1,047
  • Joined

  • Last visited

    Never

Everything posted by Azu

  1. Would somebody please tell me why these MySQL queries are running so slow and how I can optimize them? select count(*) from Z where X not in (select 1 from a) and X not in (select 2 from b) and X not in (select 3 from c); delete from Z where X not in (select 1 from a) and X not in (select 2 from b) and X not in (select 3 from c);
  2. Can somebody PLEASE move this back to the PHP section where I posted it since it has absolutely nothing to do at all with any specific web servers? Thank you.........
  3. Hehe that's what I meant sorry. I replaced it with delete but it doesn't work it just gives an error :< And I think that even if the delete went through it would mess up the database because it would remove it all not just the duplicates E.G. if there is a row and there are two duplicates of it it will delete the 2 duplicates AND the row, thus removing all of that data, instead of just the duplicate? Is there a way to fix this please? And also the error? rror Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY concat bla bla bla.... It appears when I use delete instead of the select stuff. Not sure why it's happening. :S
  4. Oops one more question please replacing select with delete * doesn't seem to work.. I thought that was all I would have to change to make it get rid of the duplicates lol.. please tell me how I have to change it to remove duplicates.. thanks.. =]
  5. Hi, thanks dude! I just have 1 more little problem ^^ Can you please tell me why it is doing this and how to fix ? I run the query in sqlyog by the way.
  6. Hi.. sorry for noisiness.. but I think I'm doing it wrong.. it seems to be returning all of the rows in the whole table.. most of which are not duplicates.. select concat(position_x,position_y,position_z) from creature group by concat(position_x,position_y,position_z); That is the exact query I am using. Thanks for your help so far btw ^^
  7. Aww.. so it's impossible to change the header without getting rid of the server core and replacing with another one? Okay.. thanks anyways ^^
  8. Can you please tell me how I can detect whether or not the client supports javascript? So that if it doesn't support it, I can have PHP do something? P.S. I need to know BEFORE headers from my server to the client, not afterwards.
  9. I have configured 7zip to use very high compression to make very small files, so it makes say a 7meg file instead of the 220meg file it does with the default settings. When I right click something and click 7zip>add to archive then it will use the settings that I set it to instead of default settings. Is there a way to do this in PHP, or to manually add these settings to the command line? Like dictionary size and compression level and all that good stuff? Please?
  10. Hi, thanks for the reply! Can you please tell me why the header cannot be changed in PHP? And is there any PHP module that might let this be done? It would be so great if there was! Even if it isn't free, as long as it's not to expensive.
  11. Let's say I have a database with 10 columns a b c d e f g h i and j I want to select or delete all rows where a c and e are duplicated So a c e row1: 1 2 3 row2: 1 2 3 That would be a duplicate row1: 1 2 3 row2: 1 2 2 Would not be a duplicate And there are a bunch of other columns in it that don't matter. Please tell me how I can do this
  12. Thanks that isn't what I am looking for though. I am looking for a way to modify this header in PHP, dynamically, per page. I am not looking for a way to just remove some certain information, and for this change to always have to be applied exactly a certain way to every single page on my website including non-PHP pages, and can only use on a host that not only allows Apache to be used as the web server but also allows me to delete the apache executable file and replace it with my own, customized one (almost NO hosts will even consider allowing this). I have been searching for days and any help would be greatly appreciated. Again, I am looking for a way to do this in PHP. I just want to modify this header in PHP, just like I can modify other headers in PHP. I would also like to edit the Date header but this is not nearly as important. Thank you for taking the time to read this =D
  13. If browsers aren't accepting cookies then use a server side database instead. More secure that way to.
  14. Please tell me how I can use PHP to change the "Server" header that is sent to the client. I tried header("Server: ".rand(-5,5)); but for some reason it didn't work. ???
  15. Azu

    Eval for PHP?

    So.. it's not possible to make a function that decodes the javascript?
  16. Okay.. I'll try that.. thanks for the suggestion
  17. Azu

    Header

    Sorry I wasn't trying to argue, I'm just confused. Can you please tell me what you mean by "use php includes"? In my htdocs folder I have a file called index.htm and in it is <?$gentime=array_sum(explode(' ',microtime()));require_once("J:/Abyss/a");?> In the folder above it I have a file called a that contains my website. What exactly am I supposed to include? And how would that help anything? I thought that PHP was a server-side language and that telling PHP to include a file/variable/whatever is the same as copy and pasting it except it saves server disk space. It sends the exact same thing to the client as if you had just typed out the whole file and the whole thing has to be downloaded anyways doesn't it? This isn't really making a lot of sense to me at all. If there is 1 page and there is a chunk of HTML in it's source, and that chunk of HTML is also in the source of another page, how exactly does the "browser cache not redownload it"??? :s And how exactly does the browser detect any differance at all between using PHP to include a file, and just putting the whole thing there in an echo, or as plain HTML outside of php tags? And also, if it you think it is easy, then please tell me, how do I get <title></title> to work when it is in a frame? And I know that frames suck, and aren't professional. The thing is, they are the best I have right now. I'm asking if someone can please offer a better solution, but it seems noone wants to. In case I didn't make it clear already, disk space is not an issue for me, CPU usage is not an issue for me, reading/writing to disk is not an issue for me, using tons of RAM is not an issue for me. My bottleneck is bandwidth. So I want to waste less of it. And thanks again for your time everyone, I just really really want to get this working okay.. ^^
  18. I changed it to use fast-cgi mode instead of cgi and it seems to be more responsive now. And it doesn't keep opening and closing processes over and over. The problem with using cron jobs to do it is that the data comes from a mysql database that is updated many times a second, and if the data was an hour old, it would be bad, and there are to many pages to have them all generated every few minutes. I'm going to try making it so that when a page is accessed it will make a cache of it and if it is less then half a minute old it will just use the cache, so that popular pages don't have to be re-generated to often. Thanks for the advice everyone!
  19. Thanks! I didn't know it could be done automatically through the command line like that ^^ It's working great now Just 1 more question please.. how can I make it so that it uses whatever I have set as the default settings? Instead of having to include all of the settings in the command line?
  20. Azu

    Nested tables

    What I mean is like.. you know how in explorer, if you have 1 folder, and there is 100 folders in it, and each of them has 100 files? It's much faster having it like this and just searching in one of those folders (E.G. "Music") for something, since it only has 100 results to look through, instead of looking through all of the files in all of the folders (or having them all in 1 folder). It works like this in MySQL also. Having a bunch of little tables and just searching through one of them, is much faster then searching through them all or then having 1 big table and searching through it. I just want a way to make tables inside of other tables, just like you can make folders inside of other folders. This way if say there is 1 thread on the forum there is 10 replies to it and 2 other threads in it that have 10 replies each, and each of those has 2 more threads with 50 replies each, each thread could have it's own table, so that only that one table would need to be searched through to find the replies, instead of looking through them all. I'm pretty sure there would be a big performance increase as the nesting grew deeper and deeper. I might be totally wrong about this and if I am please explain what is wrong about this. And if not then please tell me how to make nested tables
  21. Azu

    Nested tables

    So it isn't any faster for it to just search through 1 table with 10 rows then to search through 1 table with 100 rows or 10 tables with 10 rows each? :s
  22. Azu

    Nested tables

    I want to make a bread-crumb based navigation and storage system for my forum and for most of my website, which is all generated dynamically with PHP from a MySQL database, instead of files stored in folders. I want to make it run as fast as possible while still displaying in real-time. I thought that if the tables could be in other tables, like folders in other folders, then it would be a lot faster to be able to just search through one of these "sub-tables" just like it is faster to search in 1 little folder instead of the whole program files folder. If there is a better way to do this then that would be great!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.