Jump to content

jimbobsquarepants

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jimbobsquarepants's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for that guys .... how would i go about using soundex() ?? Soz but im still kinda new to php & mysql ...  :P Cheers  ;D
  2. Hi guys, I've had a searchws around abit and couldnt really find anything .... Basicaly i want to search my database .. ive made the query using the like function. In my database i can search on the word 'apple' ... if i search for 'apple' or 'app' or 'ap' or 'le' and so on i find it. But if i search for 'aple' which is nearly right is doesnt find it. Other then obv spelling it right ... is there a way i could use that would find apple even tho its not spelt right?? Cheers .... J
  3. Just a quick question guys ..... How would i go back the other way .. this is the one i want to reverse. [quote author=exploo link=topic=115200.msg468990#msg468990 date=1163691706] INSERT INTO C (products_id, old_code, old_model) SELECT A.products_id, A.products_model, B.products_code FROM A,B WHERE A.products_id=B.products_id; [/quote] Cheers ..
  4. Hello All, Im sure this is gonna be an easy question to solve  :-[ We are changeing product codes on about 24,000 products  :'( so what i want 2 do is copy data from a couple of tables and put them in 1. I have 3 tables A, B & C. Table A: products_id products_model Table B: products_id products_code Table C: products_id old_code new_code old_model new_model So what im trying do 2 (probs not the be way) is copy the products_id from tables A & B into table C as they are both the same. then copy products_model from table A into table C as old_code. then copy products_code from table B into table C as old_model. then i have a excel sheet with the old_code, new_code & new_model that i will need to put in table C ... so they match old_code ... if you kinda get what i mean lol Cheers ...  ;D
  5. Ok, how would be the best way to go about updating that table? Cheers
  6. I work for a mail order company that supply books, from the start of next year book ISBN numbers are changing from 10 to 13 digits. Our product code is a letter say 'M' and then the last 5 digits of the ISBN so ... M12345. That means that when the new ISBN stuff happens that will need to be changed. Also we have the ISBN in the database so that will need to be changed. In the database there are two tables that need their data updating, 'products' needs 'products_model' (the ISBN) updating and 'products_description' needs 'products_code' (you can guess ... our product code) updating. At the begaining of next year i'll be given a shreadsheet. The website is powered by osCommerce and we have around 24,000 products on there that will need updating at the start of next year  :( Hope you get what im trying to do lol So if you guys could point me in the right direction i'd be happy  ;D Thanks for your time.
  7. Ohhhhh now i see lol Worked great cheers  ;D
  8. We have a MySQL database, in one of the tables there is a column called product_code and one called product_format. All the products that have a product_code that starts with the letter A are say books... and then the letter B are DVD's .... So what i want to know is how i do i make it look in the product_code column for items that start with A and make it put Book in the products_format. Thanks Guy  ;D
  9. and then in the header i echo $breadcrumb->trail(' » '); cheers
  10. Think thats the bit you need <?php /*   $Id: breadcrumb.php,v 1.3.2.5 2004/09/20 14:21:29 tds Exp $   osCommerce, Open Source E-Commerce Solutions   http://www.oscommerce.com   Copyright (c) 2003 osCommerce   Released under the GNU General Public License */   class breadcrumb {     var $_trail;     function breadcrumb() {       $this->reset();     }     function reset() {       $this->_trail = array();     }     function add($title, $link = '') {       $this->_trail[] = array('title' => $title, 'link' => $link);     }     function trail($separator = ' - ') {       $trail_string = '';       for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) {         if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) {           $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';         } else {           $trail_string .= $this->_trail[$i]['title'];         }         if (($i+1) < $n) $trail_string .= $separator;       }       return $trail_string;     }     function custom_file($webdir, $base) {       // Note: needs to be global. Needs not to be initialised to anything.       global $badgermushroom; // apols for silly variable name, needs to be       // unique.       global $STICKY_CUSTOM_FILES;       tep_session_register("badgermushroom");       if (!$badgermushroom) { $badgermushroom = array(); }       $append = "";       for($i=0, $n=sizeof($this->_trail) ; $i < $n ; ++$i) {         $safe = $this->_trail[$i]['title'];         $safe = ereg_replace('[^a-zA-Z0-9]+', '_', $safe);         $safe = strtolower($safe);         $append = $append.$safe."-";         $test = $webdir.$append.$base;         if(file_exists($test)) {           $result = $badgermushroom[$base] = $webdir.$append.$base;           return $result;         }       };       // default result       $result = $webdir.$base;       if (!$badgermushroom[$base]) { $badgermushroom[$base] = $result; };       if ($STICKY_CUSTOM_FILES) {           // then we "stick" to the last look-and-feel           return $badgermushroom[$base];       } else {           error_log("saying (default) ".$result);           return $result;       };       return; // we never get here.     }     function string_only($separator="-") {       $string="";       for($i=0, $n=sizeof($this->_trail) ; $i < $n ; ++$i) {         $safe = $this->_trail[$i]['title'];         $safe = ereg_replace('[^a-zA-Z0-9]+', '_', $safe);         $safe = strtolower($safe);         if(strlen($string)) { $string .= $separator; }         $string .= $safe;       }       return $string;     }     function is_part($base) {       $append = "";       for($i=0, $n=sizeof($this->_trail) ; $i < $n ; ++$i) { $safe = $this->_trail[$i]['title'];         $safe = ereg_replace('[^a-zA-Z0-9]+', '_', $safe);         $safe = strtolower($safe); if($append == "") {           $append = $safe; } else {           $append = $append."-".$safe; } if($append == $base) {   return 1; }       }       return 0;     }   }   ?>
  11. Rich thanks for that ... what kinda info do you need to know to help me with the code? Cheers
  12. I've only been playing with PHP for about 4 months so im slowly getting there. On my test website i've made a breadcrumb trail ... for example it might look something like this Home >> Customer Information >> Help >> FAQs. Is it poss to do an if statement on the trail? So if the breadcrumb trail says Help then do a song and dance  ;D Cheers
×
×
  • 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.