1.sqlserveråmysqlåºå«
2.求php连接MSSQL数据源码份,有注释最好~~
sqlserveråmysqlåºå«
å¼åå ¬å¸ä¸åãå¼åå·¥å ·å æé ä¸åãå¼æ¾æ§ä¸åãsqlserveræ¯ç±Microsoftå¼ååæ¨å¹¿ãmysqlç±çå ¸MySQL AB å ¬å¸å¼åï¼å±äº Oracle æä¸äº§åãsqlserveråmysqlåºå«
å¼åå·¥å ·å æé ä¸å
1ãSQLserverï¼SQLserverè½ä¸ Microsoft Visual StudioãMicrosoft Office System以åå¼åå·¥å ·å æé ã
2ãMysqlï¼Mysqlä¸è½ä¸ Microsoft Visual StudioãMicrosoft Office System以åå¼åå·¥å ·å æé ã
å¼æ¾æ§ä¸å
1ãSQLserverï¼SQLserverä¸æ¯å¼æ¾æºç 软件
2ãMysqlï¼Mysqlæ¯å¼æ¾æºç 软件ã
SQL Serverçç¹ç¹æ¯å¯ä¿¡ä»»ã使å¾å ¬å¸å¯ä»¥ä»¥å¾é«çå®å ¨æ§ãå¯é æ§åå¯æ©å±æ§æ¥è¿è¡ä»ä»¬æå ³é®ä»»å¡çåºç¨ç¨åº;é«æã使å¾å ¬å¸å¯ä»¥éä½å¼åå管çä»ä»¬çæ°æ®åºç¡è®¾æ½çæ¶é´åææ¬;æºè½ãæä¾äºä¸ä¸ªå ¨é¢çå¹³å°ï¼å¯ä»¥å¨ç¨æ·éè¦çæ¶åç»ä»åéè§å¯åä¿¡æ¯ã
Mysqlçç¹ç¹æ¯å ¶ä½ç§¯å°ãé度快ãæ»ä½æ¥æææ¬ä½ï¼å°¤å ¶æ¯å¼æ¾æºç ãä¸è¬ä¸å°åç½ç«çå¼åé½éæ© MySQL ä½ä¸ºç½ç«æ°æ®åºã
ä»ä¹æ¯MySQLï¼
MySQLæ¯å¨å¹´ä»£ä¸æï¼åæ¥è¢«Oracleæ¶è´ï¼å¼åçï¼å®æ¯ææ©çå¼æºæ°æ®åºä¹ä¸ï¼ç´å°ä»å¤©ä»ç¶å¦æ¤ãè¿æå³çMySQLæå ç§éæ©ãä½è¿äºåä½ä¹é´çå·®å¼å¹¶ä¸å¤ªææ¾; è¯æ³ååºæ¬åè½ä¿æä¸è´ã
å·²ç»æ为MySQLç¹å¾çä¸è¥¿æ¯å®å¨åä¸ç¤¾åºä¸çå欢è¿ç¨åº¦ãå 为å®æ¯å¼æºçåå è´¹çï¼æ以å¼å人åå¯ä»¥è½»æ¾å°å¼å§ä½¿ç¨MySQLï¼å¹¶å¨ä»ä»¬å¯è½éè¦çæå°æ°æ åµä¸ä¿®æ¹å ¶ä»£ç ãMySQLé常ä¸PHPåApache Web Server ç»å使ç¨ï¼å¨Linuxåè¡çä¹ä¸ï¼è¿å¯¼è´äºèåçé¦åæ¯ç¼©ç¥è¯LAMPï¼L inuxï¼Apacheï¼MySQLï¼PHPï¼ã
ä»ä¹æ¯SQL Serverï¼
SQL Serverï¼ä¹ç§°ä¸ºMicrosoft SQL Serverï¼æ¯MySQLé¿å¾å¤ãMicrosoftå¨å¹´ä»£å¼åäºSQL Serverï¼å¹¶æ¿è¯ºæä¾å¯é ä¸å¯æ©å±çRDBMSãè¿äºå¹´æ¥ï¼è¿äºä»ç¶æ¯SQL Serverçæ ¸å¿åè´¨ï¼å 为å®æ¯å¤§åä¼ä¸è½¯ä»¶çé¦éå¹³å°ã
SQL Server主è¦é¢å使ç¨.NETä½ä¸ºå¼åè¯è¨çå¼å人åï¼èä¸æ¯PHP for MySQLãè¿æ¯æéççï¼å 为两è é½å±äºå¾®è½¯çä¿æ¤ä¼ã
求php连接MSSQL数据源码份,有注释最好~~
$conn = mssql_connect('.0.0.1','用户名','密码') or die('连接不成功'); //连接服务器
mssql_select_db('数据名',$conn) or die('数据库不存在'); //选择数据
mssql_query("sql语句");//查询数据
连接需要服务器php_mssql.dll扩展,php.ini中启用extension=php_mssql.dll (适合php5.3之前版本,金线指标源码php5.3或之后用SQLServerDriverForPHP驱动)
SQLServerDriver连接:
$serverName = "(local)";
$connectionInfo = array( "Database"=>"数据库名",清除托盘图标源码 "UID" => '用户', "PWD" => '密码');
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn )
{
echo "Connection established.\n";
}
else
{
echo "Connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}
.....................
sqlsrv_close( $conn);
/sqlserver//en/us/PHP-Driver.aspx