Help for this page

Select Code to Download


  1. or download this
    $dbh->prepare("
        insert into user_master (msisdn,cat0,cat1,cat2,cat3,cat4,cat5,cat6
    +,cat7,vip,SAcode,phone_type)
                         values (     ?,   ?,   ?,   ?,   ?,   ?,   ?,   ?
    +,   ?,  ?,     ?,         ?)
          on duplicate key update cat0=?, cat1=?, cat2=?
    ");                                                # ^^^ etc.
    
  2. or download this
    $db_update_cmd = $db_update_cmd."cat$cat=1,";
    
  3. or download this
    $db_update_cmd .= "cat$cat=1,";
    
  4. or download this
    if ( $preference =~ tr/0//)
    
  5. or download this
    if ( $preference =~ /0/ )
    # should be a more robust regexp to only capture '0', this is just to 
    +show the right operator