2

PHP+MySQL 学习心得

 8 months ago
source link: https://jiongks.name/blog/2009-05-18
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

PHP+MySQL 学习心得

本文摘自 勾三股四 更早时期的 不老歌 博客。


最近在看一本跟 PHP/MySQL 相关的书籍,使我更深入的了解和认识了这些技术。这里会不定期更新一些自己的学习心得。以备将来复习用,同时也分享给大家:

1. 调用函数的时候,在函数名前加 @ 符号会避免由于函数执行出错而输出的错误信息。
2. 形如 mysql_xxxx 的很多函数都有一个可选参数,即代表某个数据库连接的变量,这个参数通常在我们见到的 PHP 程序例子中都被省略了,当这个参数被省略时,执行该函数的数据库连接即为最近一次建立的数据库连接。
3. mysql_fetch_array 有一个可选参数,决定返回的数据库数据结构是顺序列表还是散列表还是两者兼有,默认是两者兼有,即$row[0]、$row[1]...和$row["id"]、$row["nickname"]...两种方式都可以顺利访问数据库数据。
4. 多选的 select 控件在提交表单时,可以将其 name 设置为数组名,如:

Related Issues not found

Please contact @jinjiang to initialize the comment


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK