Jump to content

jaymc

Members
  • Posts

    1,521
  • Joined

  • Last visited

    Never

Everything posted by jaymc

  1. just a quick one, I cant remember how to do this I want to execute a function on every element in an array, but leave the result in the array So instead of this $song_data[song_name] = mysql_real_escape_string($song_data[song_name]); $song_data[artist_name] = mysql_real_escape_string($song_data[artist_name]); $song_data[album_name] = mysql_real_escape_string($song_data[album_name]); $song_data[genre] = mysql_real_escape_string($song_data[genre]); $song_data[year] = mysql_real_escape_string($song_data[year]); $song_data[kbps] = mysql_real_escape_string($song_data[kbps]); I could have something like magic_function($song_data, mysql_real_escape_string()); Thanks!
  2. No, I mean storage field The text in the fulltext field is never used for search It is simply printed out
  3. Im using ajax to load some content in a div, working fine However, the content which I am placing in the div contains some javascript which I need executing Lets just for instance say the content I wanted to dynamically load in the div was this Hello World <script type="text/javascript"> alert('hi'); </script> Question is, how to get the alert to execute in its enviroment Im justing alert as an example by the way
  4. Do you install openVZ as the base operating system? Or is it an application that runs over the top of existing OS like centos etc
  5. why do you love it, spill the beans! Good and bad points?
  6. I'm going to be buying some monster servers soon with intension of partitioning the hardware to run multiple instances of centos, hence virtual I've used vmware but its rather pricey. I've heard of xen which is free. Has anyone successfully used this? If I'm looking to save on the dollar but still have a good setup what should I be looking into. Thanks
  7. Im currently sitting on centos 4.4 apache 2 and PNP 5.0. Can anyone help I'm trying to upgrade to latest 5.2. I usually use yum but doesn't appear to be doing it. I managed to get an rpm but it fails on a ron of dependencies. Is there an easier way to just get the dam thing upgraded. Turning out to be a nightmare.
  8. What are my options then? Am I stuck with myisam if I want to store a lot of characters?
  9. I recently converted nearly all my tables from MYISAM to INNODB I was expecting mysql load/locking to go down significantly, but.. it just hasn't I keep getting spirals of locking, 30 - 70 queries in the que I captured a query that was in the que for the longest at 12 seconds, I ran the same query after the load had gone and it took 0.08 seconds, so its not a bad query and since it was in the que for the longest, its not as if it was waiting for another query to finish. Should it even? I thought innodb meant no table locking.. Anyway, I have been unable to convert 3 tables to INNODB, they are the ones which use fulltext. Dont quote me on this but it does appear to be these tables that are causing the problem. At a guess I would say these are the source of whats kicking things off However, before the convert, I never had a problem with them.. so? Perhap because I'm now using INNODB, which has meant changes in the my.cnf to assign memory to the pool, is that some how over powering any table that uses MYISAM. For instance, where as MYISAM could feely use 768MB of the key_buffer, can now only use 128MB because INNODB tables are eating what memory I have assigned to that Hope someone can give some suggestions. I dont want to convert everything back to MYISAM without investigating. Is there a way to get FULLTEXT field tables running on INNODB. using BLOB or something? I was thinking of normalising tables with FULLTEXT and have the FULLTEXT field in a redundant table for that, but that would still be MYISAM and probably problimatic Any ideas/suggestions/things to try/look out for Thanks!
  10. Yeh I know what you mean, a lot of my site is ajax but having everything in it is too much I guess its either that or frames, will stick with frames Although still looking for a fail safe way to serve bots my content page and not the frames
  11. Over to the TheFilmGod ...
  12. I dont, thats what my question was How can I check to see if its a bot viewing my page If I have that I can do the rest
  13. Im sitting on 2x 1.4Ghz cpu with 3GB ram Here is everything from my.cnf related to innod innodb_data_file_path = ibdata1:500M:autoextend innodb_buffer_pool_size = 2500M innodb_additional_mem_pool_size = 2M innodb_flush_method = O_DIRECT Perhaps Im hitting some kind of configuration bottle knecks?
  14. No its not
  15. I think it took me 5-10 minutes last time, assuming innodb not too good with altering or adding indexes etc
  16. I have a table with 7.5 Million rows only 4 fields, 2 varchar(25) and the others int(12) It was originally myisam, but I wanted to convert it to INNODB I tried using the ALTER TABLE to do a straight convert but after 4 hours of it running and bringing the server to a halt I give up I realised it was probably due to it having to reindex after every insert, so I created another table with innodb engine, inserted all the rows accross with no index and that worked fine, took about 3 minutes Now, I need to add my index back, its been running for 2 hours now on the varchar(25) Is this just how it is since the table is 7.5million rows?
  17. Great, thanks
  18. So pretty much only useful if that table is queried with the same queries over and over..
  19. I have read a bit about using covering indexes In this example select b from tbl where a=5 Having a covering index over a,b would mean only one read from the index, rather than a index read to get the row pointer and then table to get the data Simple enough, but lets say I wanted to have select b,c,d,e,f from tbl where a=5 Does that mean, to effectively use a covering index in that situation I would need a index covering a,b,c,d,e,f If so, again simple enough but what if I have various queries that pull out different fields, for example select d,e,f from tbl where a=5 select b,e,f from tbl where a=5 selecte,f from tbl where a=5 Is that a covering index for each of them? Any more info on how to use this effectively would be great
  20. Cool Whats the best way to detect any search engine spider I dont want to limit just to google I want to be able to basically have in php if ($source = "robot") {include("noneframes.php")} else {include("frames.php")} What should $source be and what should it be checking for
  21. It has to be flash the music player which i alrady have, and i dont want any other windows open, even if its a progra/wmp How about having some code detect whether it is google bot reading the page, if so, redirect them/load the main content without the frames That way according your google your homepage is the actualy content page not the frame place holder That feasable do you think?
  22. 1: No one likes popups 2: I want it inside the website 3: People have popup blockers
  23. I have an audio feature on my website which plays music. I strictly want the music to carry on playing whilst they browse around different pages on the site. To make this work, I figure the only option is to have a top iframe, 20px in height and a bottom iframe which fills the rest of the remaining space. From client point of view, you wouldnt even know, so no issues there. However, this means that when search engines hit my website, they wont see all my content/links etc, they will just see a page with 2 iframes on. This will seriously screw up any chance of google nicely indexing my website, right?. Or am I missing something. I cant have the audio player in a popup by the way, so thats a no go. I dont mind the iframes, I just dont want it to screw google up. Thanks.
  24. Thanks.
  25. I'm hoping you've read this. I have and dont see anything that should particulary be something I need to be worried about? Apart from the MAX query when mysql is restarted Unless I missed something, it looks like the conversion should be pretty painless? Thanks
×
×
  • 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.