Jump to content

ghurty

Members
  • Posts

    149
  • Joined

  • Last visited

Posts posted by ghurty

  1. I am trying to move about 40 databases from one server to another. Is there an easy to use command that will allow me to do that?

     

    The two servers are on separate private networks, so I may not be able to copy them directly, so what I would want to do is create a backup, then manually move it and the restore it.

     

    I belive I need to exclude informatio_schema as well as the mysql databses.

     

    Thanks

  2. In the following code, I am getting an error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '{' or '$' in XXX on line 235

     

    Line 235 is the second line in the code snippet

           $result = mysql_query( $querystr, $this->linkid );
            $this->"queryid".$id = $result;
            if ( defined( "SWIFTDEBUG" ) )
            {

     

    Thanks

  3. I am trying to convert a variable that contains a telephone number in  this format: 8005551212  to this format:(800) 555-1212.

     

     

    The variable that contains the number is  $cidnum:

     

    $callerName = getCallerInfo($cidnum, $adb);

     

    So I would want to add a line above it that will switch $cidnum from being 8005551212 to (800) 555-1212.

     

     

    That is what I would mainly like to do. But is there a way to also have it that if it is a longer number (ie: a international number: 0845 060 3000) To have it that in that case it will rewrite it to be the international style?

     

    Thanks

    Thanks

     

     

  4. I am trying to convert a variable that contains a telephone number in  this format: (800) 555-1212 to this format:8005551212.

     

     

    The variable that contains the number is the initial $to:

     

    function transfer($from,$to){
                    $this->log->debug("in function transfer($from, $to)");
                    if(empty($from) || empty($to)) {
                            echo "Not sufficient parameters to create the call";
                            $this->log->debug("Not sufficient parameters to create the call");
                            return false;
                    }
    	  $to = "sip:$to";
                   	
    

     

     

    So for right now, $to ens up being "sip:(800)555-1212" I want it that it ends up being "sip:8005551212".

     

     

    Thanks

  5. I have the following script that works perfectly. The problem is when I substitute a variable it stops working:

    #!/usr/bin/php -q
    <?php
    $origdirectory= '/temp/0125/;
    $destdirectory='/destination/';
    if(is_dir($origdirectory))
    {
      $dh=opendir($origdirectory);
      $ctr=0;
      while($ctr<15 && $file=readdir($dh))
      {
        if(is_file($origdirectory.$file))
        {
          rename($origdirectory.$file,$destdirectory.$file);
          $ctr++;
        }
    }
    closedir($dh);
      if(!$ctr) rmdir($origdirectory);
    }
    ?>

     

    But when I try to change to:

    $temp = date(md);
    $origdirectory= '/temp/$temp/';
    

     

    It stops working. I am using 0125 in this example, because it is todays date.

     

     

    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.