php用哪个数据库好 phpstudy运行带数据库的php( 三 )


实例三
// Get one variable from the database and print it out $var = $db get_var("SELECT count(*) FROM users");echo $var;
实例四
// Insert into the database$db query("INSERT INTO users (id name email) VALUES (NULL justin jv@foo )");
实例五
// Update the database$db query("UPDATE users SET name = Justin WHERE id = )");
实例六
// Display last query and all associated results$db debug();
实例七
// Display the structure and contents of any result(s) or any variable$results = $db get_results("SELECT name email FROM users");$db vardump($results);
实例八
// Get one column (based on column index) and print it out $names = $db get_col("SELECT name email FROM users" )foreach ( $names as $name ) {echo $name;}
实例九
// Same as above ‘but quicker’foreach ( $db get_col("SELECT name email FROM users" ) as $name ) {echo $name;}
实例十
lishixinzhi/Article/program/PHP/201311/21297
【php用哪个数据库好 phpstudy运行带数据库的php】php用哪个数据库好的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于phpstudy运行带数据库的php、php用哪个数据库好的信息别忘了在本站进行查找喔 。

推荐阅读