Archive

Archive for the ‘PHP Questions’ Category

SQL Star International Ltd, Hyderabad, Singapore, USA

November 16th, 2010 admin No comments

SQL Star is going through a renaissance. A redefinition of its philosophy and its business values.

The one thing that is constant, however, is its belief in people and technology. A belief that is strengthened by the passion of its team, a passion for people and the passion to drive technology beyond its limits.

India (Hyderabad)

SQL Star International Ltd
SQL Star House,
No. 8-2-293/174/A 25,
Road No. 14, Banjara Hills,
Hyderabad – 500 034,
Andhra Pradesh, INDIA
Phone: 040 – 23101600 – 603
Fax: 040 – 23101608
Email: corporate.affairs@sqlstar.com

Singapore

International SQL Star Pte. Ltd
Asia Pacific Head Quarters
100 Beach Road
#12-02, Shaw Tower
Singapore 189702

Telephone: +65 6324 4424
Fax: +65 6324 4425
Email: info.singapore@sqlstar.com

AUSTRALIA

SQL Star International Pty Ltd
Level 7, Suite 7
Strathfiled Plaza
11 The Boulevarde
Strathfield NSW 2035

Telephone: +61 2 97461369
Fax: +61 2 9746 5865
Email: info.australia@sqlstar.com

UNITED STATES OF AMERICA

SQL Star International Inc.
8820 Kenamar Drive, Suite 506
San Diego, CA – 92121

Phone: +1 650 204 9490
Email: info.usa@sqlstar.com

Website: http://www.sqlstar.com/

How to connect mssql server in PHP

November 14th, 2009 admin 1 comment

This Questions are i got from one of my friend S.Periyasamy. Now he is working as a PHP software developer at SST Software International, Kottivakkam.

1. How to Install a Flash Plugin in Internet Explorer 6 ?

http://www.ehow.com/how_4809424_install-flash-plugin-internet-explorer.html

2. How to enable ActiveX controls in Internet Explorer 6 ?

http://www.downloadatoz.com/windows-registry/faq,how-to-enable-activex-controls-in-internet-explorer-6.html

3. How to develop Variables name as dynamically?

->For example we have define variable name through loop.

for ($i = 1; $i <= $total_fields; $i++ ) {
${"data_$i"} = file_get_contents($page_id.′_′.$i.′.html′); //$data_1,_2,_3.....
if ( $i != $total_fields ) {
${"contents_$i"} = getPageContents($page_id,$i); //$contents_1,_2,_3.....
}
}

http://us3.php.net/manual/en/language.variables.variable.php


4. How to connect mssql server in PHP?

Ex:
$myServer = "localhost";
$myUser = "your_name";
$myPass = "your_password";
$myDB = "examples";

//connection to the database
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn′t connect to SQL Server on $myServer");

//select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
or die("Couldn′t open database $myDB");

//declare the SQL statement that will query the database
$query = "SELECT id, name, year ";
$query .= "FROM cars ";
$query .= "WHERE name=′BMW′";

//execute the SQL query and return records
$result = mssql_query($query);

$numRows = mssql_num_rows($result);
echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>";

//display the results
while($row = mssql_fetch_array($result))
{
echo "<li>" . $row["id"] . $row["name"] . $row["year"] . "</li>";
}
//close the connection
mssql_close($dbhandle);
?>

5. How to get mssql error message in PHP?

mssql_get_last_message();