Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I just go through in google get <a href="http://www.easysoft.com/developer/languages/php/sql_server_unix_tutorial.html">this instruction</a> this is really helpful for you.</p> <ol> <li><a href="http://www.easysoft.com/cgi-bin/account/login.cgi">Download the SQL Server ODBC driver for your PHP client<br> platform.</a> (Registration required.) If the SQL Server ODBC driver is not currently available for your platform, check the list of<br> <a href="http://www.easysoft.com/products/data_access/odbc_odbc_bridge/index.html#platforms">ODBC-ODBC Bridge Client platforms</a>. The ODBC-ODBC Bridge is an<br> alternative SQL Server solution from Easysoft, which you can download from this site.</li> <li>Install and license the SQL Server ODBC driver on the machine where PHP is installed. For installation instructions, see the ODBC driver documentation. Refer to the documentation to see which environment variables you need to set <strong><code>(LD_LIBRARY_PATH, LIBPATH, LD_RUN_PATH, SHLIB_PATH depending on the driver, platform and linker).</code></strong></li> <li><p>Create an ODBC data source in <code>/etc/odbc.ini</code> that connects to the <code>SQL Server database</code> you want to access from PHP. For example, this SQL Server ODBC data source connects to a SQL Server Express instance that serves the Northwind database:</p> <ul> <li>Use isql to test the new data source. For example: <strong><code>cd /usr/local/easysoft/unixODBC/bin</code></strong></li> </ul> <p>./isql -v MSSQL-PHP</p></li> </ol> <blockquote> <pre><code>[MSSQL-PHP] Driver = Easysoft ODBC-SQL Server Server = my_machine\SQLEXPRESS User = my_domain\my_user Password = my_password </code></pre> </blockquote> <p>Please copy and paste this script and execute this </p> <pre><code>&lt;? /* PHP MSSQL Example Replace data_source_name with the name of your data source. Replace database_username and database_password with the SQL Server database username and password. */ $data_source='data_source_name'; $user='database_username'; $password='database_password'; // Connect to the data source and get a handle for that connection. $conn=odbc_connect($data_source,$user,$password); if (!$conn){ if (phpversion() &lt; '4.0'){ exit("Connection Failed: . $php_errormsg" ); } else{ exit("Connection Failed:" . odbc_errormsg() ); } } // This query generates a result set with one record in it. $sql="SELECT 1 AS test_col"; # Execute the statement. $rs=odbc_exec($conn,$sql); // Fetch and display the result set value. if (!$rs){ exit("Error in SQL"); } while (odbc_fetch_row($rs)){ $col1=odbc_result($rs, "test_col"); echo "$col1\n"; } // Disconnect the database from the database handle. odbc_close($conn); ?&gt; </code></pre> <ol> <li>Replace <code>data_source_name, database_username and database_password</code> with your SQL Server ODBC data source, login name and password.</li> <li><p>To run the script under Apache, save the file below your Apache web server’s document root directory<code>. For example, /var/www/apache2-default/php-mssql-connection.phtml. Then view the file in a web browser:</code></p> <pre><code>http://localhost/php-mssql-connection.phtml </code></pre></li> <li>If your web browser is not running on the same machine as the web server, replace localhost with the web server’s host name or IP address.</li> <li><p>To run the script from the command line, save the file. </p> <p>For example, /tmp/php-mssql-connection.php. Then run $ php /tmp/php-mssql-connection.php.</p></li> </ol> <h2>further more Details Refer this <a href="http://www.easysoft.com/developer/languages/php/sql_server_unix_tutorial.html">LINK</a></h2>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload