Announcement

Collapse
No announcement yet.

glo_nm_conexao ... how does it work within code ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • glo_nm_conexao ... how does it work within code ?

    Hi ,
    I'm trying to make a blank application to download sql select into csv file.
    At the beginning I have to declare the connection variable but I don't want to declare it .
    Is it possible to use that one defined into SC ?
    I've tried this down here.... without success
    Thanks

    //$conn = mysql_connect("localhost","root","");

    $conn = '[glo_nm_conexao]';

    mysql_select_db("eos_b2bc",$conn);

  • #2
    Ok . Solved like that

    //$conn = '[glo_nm_conexao]';
    $server= [sc_glo_servidor];
    $userdb =[sc_glo_usuario];
    $userpwd = [sc_glo_senha];
    $db = [sc_glo_banco];

    //$conn = mysql_connect("localhost","root","");
    $conn = mysql_connect($server, $userdb , $userpwd);

    Comment


    • #3
      Originally posted by giovannino View Post
      Ok . Solved like that

      //$conn = '[glo_nm_conexao]';
      $server= [sc_glo_servidor];
      $userdb =[sc_glo_usuario];
      $userpwd = [sc_glo_senha];
      $db = [sc_glo_banco];

      //$conn = mysql_connect("localhost","root","");
      $conn = mysql_connect($server, $userdb , $userpwd);
      or you can create a SC database connection with sc_connection*
      http://giudev.blogspot.com.es/2014/1...manejo-de.html

      EDITED

      SOrry, in english: http://www.scriptcase.net/scriptcase..._databases.php
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment

      Working...
      X