How to change the file extension of SFO in PHP program?

~ 0 min
2016-03-04 11:15

Following is the sample:

$conn=odbc_connect("nba","SYSADM","");

   if($conn)

         {

              error_reporting(0);

              odbc_do($conn,"drop table php_fotest");

              error_reporting(7);

         $res1=odbc_do($conn,

                       "create table php_fotest(c1 int,c2 file)");

          if($res1){

                             $res=odbc_prepare($conn,

                                     "insert into php_fotest values(?,?)");

                    odbc_exec($conn, "set extname to 'aaa'");

                   $param[0]=1;

                   $param[1]="'rahim.jpg'";

                   $res2=odbc_execute($res,$param);

                   if($res2)

                        {

                         $res3=odbc_exec($conn,"select c1,filename(c2) from php_fotest");

                         $str1=odbc_result($res3,1);

                         $str2=odbc_result($res3,2);

                         echo "$str1\n";

                         echo "$str2\n";

                          echo "Show dbmaker system fo image file ";

                          echo "<IMG SRC=\"display2.php?id=1&dbuser='SYSADM'&dsn='nba'&dbpwd=''\"><p>";

                        }

                   }

        }

Average rating 0 (0 Votes)