安裝好 AppServ 套件後,電腦中就會設置有 MySQL 做為 PHP 程式使用的資料庫,並且有 MySQL Command Line Client (DOS 命令行) 環境,可以用來存取 MySQL 中的資料。
在使用
show databases;
use DB_name;
show tables;
select * from Table_name;
輸入指令:set names big5; (繁體中文)、set names gbk; (簡體中文)
以前這名的主人,會說 Perton 是 普通(台語)。 信主後,Perton 是主の殿與教會,他已不再和以前一樣,舊事已過,今日已成新造之人。 定睛在主的榮面上,遠重於人話語上的小信及自我抵毁。
安裝好 AppServ 套件後,電腦中就會設置有 MySQL 做為 PHP 程式使用的資料庫,並且有 MySQL Command Line Client (DOS 命令行) 環境,可以用來存取 MySQL 中的資料。
在使用
show databases;
use DB_name;
show tables;
select * from Table_name;
輸入指令:set names big5; (繁體中文)、set names gbk; (簡體中文)
C:\Documents and Settings\perton>mysql -hlocalhost -uroot -p****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 6.0.4-alpha-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> \h
For information about MySQL products and services, visit:http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:http://dev.mysql.com/
To buy MySQL Network Support, training, or other products, visit:https://shop.mysql.com/
List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
| ? | (\?) | Synonym for `help'. |
| clear | (\c) | Clear command. |
| connect | (\r) | Reconnect to the server. Optional arguments are db and host. |
| delimiter | (\d) | Set statement delimiter. NOTE: Takes the rest of the line as new delimiter. |
| ego | (\G) | Send command to mysql server, display result vertically. |
| exit | (\q) | Exit mysql. Same as quit. |
| go | (\g) | Send command to mysql server. |
| help | (\h) | Display this help. |
| notee | (\t) | Don't write into outfile. |
| (\p) | Print current command. | |
| prompt | (\R) | Change your mysql prompt. |
| quit | (\q) | Quit mysql. |
| rehash | (\#) | Rebuild completion hash. |
| source | (\.) | Execute an SQL script file. Takes a file name as an argument. |
| status | (\s) | Get status information from the server. |
| tee | (\T) | Set outfile [to_outfile]. Append everything into given outfile. |
| use | (\u) | Use another database. Takes database name as argument. |
| charset | (\C) | Switch to another charset. Might be needed for processing binlog with multi-byte charsets. |
| warnings | (\W) | Show warnings after every statement. |
| nowarning | (\w) | Don't show warnings after every statement. |
For server side help, type 'help contents'
mysql>
首先,啟動 Eclipse 程式,從功能表
Help > Install New Software
選定 Word with: 右方的按鍵 Add,在新視窗中,補上下列訊息:
Name : PyDev
Location : http://pydev.org/updates
按下 OK 鍵後,原本的 Install 視窗會有 Pending 字樣產生,等待一段時間後,視窗中央部份會展開如下圖所示,
請勾選 PyDev for Eclipes 項目
按下 Next ,
接受程式使用條款
系統做安裝的動作
重新啟動 Eclipse
哈哈,完成安裝作業了 !!
Eclipse 是著名跨平台的自由集成開發環境(IDE)。最初主要用來Java語言開發;目前亦有人通過外掛程式使其作為C++、Python、PHP等其他語言的開發工具。
Eclipse最初是由IBM公司開發,2001年11月貢獻給開源社區,現在它由非營利軟體供應商聯盟Eclipse基金會(Eclipse Foundation)管理。
Eclipse有專門用來開發PHP程式的工具:PHP Development Tools
可由 http://www.eclipse.org/pdt/ 下載。
若要使用 Eclipse 建置程式檔案,希望以 utf-8 格式存檔時,需做下列環境的調整:(默認是 ANSI 格式, encoding MS950)
之前,曾經寫下 OpenDataSource 的用法;這方法一般來說,是夠使用了。
http://pertonchang.blogspot.com/search?q=OpenDataSource+
不過,當你使用的特殊字元來當密碼的一部份內容時,可能就會有問題。
==> 會抓不到資料.
再看下 OpenDataSource 的語法 SELECT *
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=ServerName;User ID=MyUID;Password=MyPass' ).Northwind.dbo.Categories
記得用雙引號(")將特殊字元括住 SELECT *
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=ServerName;User ID=MyUID;Password= "MyPass"' ).Northwind.dbo.Categories
另外,再介紹一個 Linked Server 的用法
如果你的環境有在 SQL Server ,Security / Linked Servers 中設定,例如:LOCAL
跨資料庫抓資料的語法,就變成了
SELECT *
FROM LOCAL.Northwind.dbo.Categories
函式指標 Pointer to Function
( * f ) () 指向函式位址的指標
指標函式 Pointer Function
* f () 傳回指標值的函式
* ( f () )
陣列指標 Pointer to Array
( * f ) [] 指向陣列位址的指標