Jump to content

mapleleaf

Members
  • Posts

    250
  • Joined

  • Last visited

    Never

Everything posted by mapleleaf

  1. Can I replace any items in my array with something else? like: $array = "apple, peach"; echo preg_replace("/($array)/i", "lemon");
  2. Can i put an array into a like search? So select * where like '%myarray%'; Pseudo code. So if the array has 3 words and I want to check if any of them show up? Is it possible with LIKE? Tx
  3. Riwan that is what I needed. thanks. theme was the theme name by the way fenway. Tx to both
  4. Keep track of ip,user_agent info and the time of registration. Often bots will do lots of activity in a couple of seconds. At least this will help you know what you are dealing with You could also block bots by browser string. Java.... is never a user agent you need on your site. Some are malicious.
  5. I have an articles table with a tag field and a theme field.(and other fields) The theme field takes a single theme_id. Themes are in their own table. I want to pull all the articles that have duplicated the theme name in their tags. Tags are comma separated. It seems like it would be easy but.... Pseudo: SELECT * FROM articles, themes WHERE themes.theme like '%articles.tags%' Tx
  6. That looks like it might work though I see it isn't as accurate as using a zip code based search which isn't too surprising. Thanks for the pointer.
  7. Does anyone have a good class that grabs someones location from their ip? long/lat.
  8. That is a good question. I thought I had it downloaded and installed. It seems that PHP thinks it is there because the extension is loaded <?php if(extension_loaded('Memcache')){ // Memcache is enabled. echo 'Yes!!'; } came back with Yes!! What other steps do I need to take to get in running? Using Mamp.
  9. Anyone know of a spellchecker that I can specify British English? I am using TinyMCE but it allows US spellings as well as British. (GoogleSpell) Ideally I would like one that can add words to its list. For example I working on a site that uses Sanskrit words and I want them added to the dictionary. Thanks
  10. It the server is not hit there is no php so you will need at least some AJAX or some kind of refresh of the page.
  11. Too late to edit. That was relevant section of phpinfo() This is in php.ini extension=memcache.so
  12. I installed Memcache locally and I see it in phpinfo but it fails to connect <?php $memcache = new Memcache; $memcache->connect('localhost', 11211) or die ("Could not connect"); ?> In my php.ini it is enabled. What did I miss in the set up process. I restarted the server. Relevant section of the php.ini memcache memcache support enabled Active persistent connections 0 Revision $Revision: 1.94 $ Directive Local Value Master Value memcache.allow_failover 1 1 memcache.chunk_size 8192 8192 memcache.default_port 11211 11211 memcache.hash_function crc32 crc32 memcache.hash_strategy standard standard memcache.max_failover_attempts 20 20 Any thoughts much appreciated
  13. the sql.sql file being on my local machine. What path does it need to know?
  14. What is the command line for importing a database into mysql? What I really mean is to upload the database writing over the old one. I have a dump file.
  15. looks like it is a microsoft spam check catching it. Goes through to yahoo
  16. if(mail("myemail@hotmail.com", "test","test")) echo "Really"; Really is echoed out yet no email is arriving. Any idea how to check up on what mail did?
  17. if($v=2) { while($i < $v) { //your <td> code and whatever content \\display table columns and rows } } I am still wondering why one might do this as presumably the content of the tables isn't random too??
  18. select * from parts_in_stock where (description like '%flex%' and model like '%95%') or (description like '%95%' and model like '%flex%') is I think what you need
  19. 1 and 4: http://help.scibit.com/Mascon/masconMySQL_Field_Types.html 2 PhpMyadmin does have enum. 3 varchar is ok but I believe md5 has been broken so use sha1 with a salt
  20. textarea or just a regular input text field? If it is a textarea use tinymce or FckEditor. Otherwise you will need to decide when to cut the string which might not work depending on how you are using your form
  21. Like will return on 2660 and not on 2660 lcd because the % only allows any character after or before the string. You will need to explode on the space and commas as people may put them in. Then query for each on the array.
  22. Not sure why you need the id to become available again. I assume there is no signing up just allocating ids for the session. Still there will need to be some sort of human readable identifier for those in the chat.
  23. Codeigniter. Easy to learn. Great documentation.
×
×
  • 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.