Advanced Search

Results 1 to 4 of 4

Thread: get data from SQL through the web server without created a link to SQL server.

  1. #1
    Join Date
    Aug 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default get data from SQL through the web server without created a link to SQL server.

    as title, i want get data from SQL server but i cant connect to SQL server because of company policy.
    The administrator jz can give me procedure and let me execute at web server to get data from SQL server..
    but i not really understand about that....i try search from google n yahoo but also cant get what i want...
    any expert can guide me to search or tell me what about that...

    thanks a lot....

    i m using PHP for d web server.

  2. #2
    Join Date
    Apr 2006
    Posts
    190
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default

    You need to know the address of the SQL Server, u need a Username and Password to the server, and you need the name of a Database.

    Code:
    <?php
    mysql_connect("address","username","password"); 
    mysql_select_db("database"); 
    ?>
    But you said that your company policy dose not allow you to connect to the SQL server, well you need to be able to connect in order for you to get any data.
    Ryan
    Sevierville, TN

  3. #3
    Join Date
    Aug 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by NXArmada
    You need to know the address of the SQL Server, u need a Username and Password to the server, and you need the name of a Database.

    Code:
    <?php
    mysql_connect("address","username","password"); 
    mysql_select_db("database"); 
    ?>
    But you said that your company policy dose not allow you to connect to the SQL server, well you need to be able to connect in order for you to get any data.
    is my question not so clearly.

    this i noe, that connect to MySQL database.
    but currently is, i had connect to MySQL database, in other time i aslo want get data from MS SQL server. But problem is i jz can get procedure from the administator and cant direct refer to the table and get data.

    because of keeping history record, s previous developer had get data from MS SQL server and insert into MySQl database. But this cause the application run very slow. Beside created index for the database, any other solution?

    isnt a good way that i insert only data that want keep for history data into MySQL database and get other data that not need for history purpose from MS SQL server?

    isnt will have better performance compare with insert all data that need for the application every time and the application only get data from MySQL Database?

  4. #4
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    is my question not so clearly.
    apparently, yeah
    Please don't mind me. I am just posting a lot of nonsense.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •