TAILIEUCHUNG - PHP HOW TO 2

Appendix B SQL abstraction Example Submitted by: Gianugo Rabellino nemorino@ To get this file, in the web−browser, save this file as 'Text' type as | PHP HOW-TO function showurl col fmt v this- valueof col if v printf t td s td n fmt else printf t td s a href s s a td n fmt v v function display if this- valid return printf table cellspacing 1 cellpadding 1 border 1 n printf tr n for c 0 c this- cols c this- showheader c printf tr n this- first while this- eof printf tr n for c 0 c this- cols c this- showvalue c printf tr n this- next printf table n Free memory allocated to recordset. function free pg_Freeresult this- resultset 18 PHP HOW-TO B SQL abstraction Example Submitted by Gianugo Rabellino nemorino@ To get this file in the web-browser save this file as Text type as PX PHP Code Exchange php SAL - SQL Abstraction Library version Set the variable dbtype to any of the following values MySQL mSQL Postgres ODBC before including this library dbtype MySQL dbtype mSQL dbtype PostgreSQL dbtype ODBC SQL_connect host user password db returns the connection ID function SQL_connect host user password db global dbtype switch dbtype case MySQL conn mysql_pconnect host user password mysql_select_db db return conn break case mSQL conn msql_pconnect host msql_select_db db return conn break case PostgreSQL conn pg_pconnect host 5432 db return conn break case ODBC conn odbc_pconnect db user password return conn break default conn mysql_pconnect host user password mysql_select_db db return conn break B SQL abstraction Example 19 PHP HOW-TO SQL_query host user password db executes an SQL statement returns a result identifier function SQL_query query id global dbtype switch dbtype case MySQL res mysql_query query id return res break case mSQL res msql_query query id return res break case PostgreSQL res pg_exec id query return res break case ODBC rid odbc_prepare id query res odbc_execute rid return res break default res mysql_query query id return res break SQL_num_rows host user password db given a result identifier returns the number of affected rows function .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.