Jump to content

dennismonsewicz

Members
  • Posts

    1,136
  • Joined

  • Last visited

Everything posted by dennismonsewicz

  1. alright, I shall take a look at it. I haven't really gotten a good jump on all of the joining that you can do in mysql but I reckon this is a good place to start
  2. Is there anyway to count the number of times a particular name shows up in a sql string and manipulate that particular name? IE: if I have a string like this: dog, cat, horse, dog, fish, donkey, cow, dog, bull And then I wanted to count the number of times dog shows up... any ideas?
  3. like to make it bold using HTML tags IE: <b></b>, <strong></strong>, <p style="font-weight: bold"></p>
  4. I have a string in mysql as follows (this is just an example): bird, frog, dog I want to be able to search the string and bold the last word of the string. In this example I want to bold dog. Any ideas?
  5. problem solved you have to place the current timestamp on_update field first
  6. i am using php myadmin to create a datetime field and when i tell it to on update current_timestamp and I am receiving an error: #1294 - Invalid ON UPDATE clause for 'update_date' column
  7. ah gotcha, I will give that a try, thanks
  8. can you give me an example using the now() function?
  9. Is there a way to record a time stamp and date stamp in a mysql db and have it become static once the row has been created and then if a user updates that particular row have another column change according to when the user changed the information?
  10. you might want to look at jQuery or any other open JS library http://www.ajaxrain.com/index.php - this is a good site as well
  11. I love this site! Your script worked like a charm! Thanks!
  12. I have this code: function replace_plain_text_link($plain_text) { $url_html = preg_replace( '/(?<!S)((http(s?):\/\/)|(www.))+([w.1-9\&=#?-~%;]+)/', '<a href=”http$3://$4$5″>http$3://$4$5</a><br />', $plain_text); return ($url_html); } but it only replaces the root address. IE: www.test.com. anything after the .com does not become a link. Any suggestions?
  13. I have a script that allows users to insert comments when they add a new entry into the CMS Well The comments box is just a normal HTML textarea The problem I am having is that users sometimes include links to other sites (which is allowable in the CMS I built) but what I need to happen is for my script to convert them into links to their respected places. Example: If a user puts in the comments this www.google.com, www.yahoo.com, www.phpfreaks.com I would like to convert the text links to actual html links, any suggestions?
  14. I would try this tutorial site http://www.tizag.com/phpT/forms.php
  15. I will definitely give it a shot, thanks!
  16. so there is no way to just search all rows?
  17. if your computer is your web server
  18. you could simply use explode to accomplish this $file = explode(".", basename($file)); this will now place your entire file name (with the extension) in an array so to access just the extension you would call it like this: echo $file[1]; for the filename like this echo $file[0];
  19. what I am trying to accomplish is this: I have a mysql table and I am wanting my script to look through each row of the table and wherever it finds an "x" replace it with an image.
  20. didn't work updated code: $sql = mysql_query("SELECT * FROM board") or die(mysql_error()); while($row = mysql_fetch_array($sql)) { $arr[] = $row; $img = "images/x.jpg"; $replace = str_replace("x", $img, $arr); echo $replace; }
  21. I have this code: $sql = mysql_query("SELECT * FROM board") or die(mysql_error()); while($row = mysql_fetch_array($sql)) { $arr[] = $row; $img = "images/x.jpg"; $replace = str_replace("x", $img, $arr); } echo $replace; I am trying to search for X within the array and replace it with an image. But all I am getting echoed out is the word Array. Any help?
×
×
  • 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.