摘要:
把XML转换成对象直接调用里面的属性 <?php$note=<<<XML<note><to>Tove</to><from>Jani</from><heading>Reminder</heading> <body>Don't forget me this weekend!</body></note>X 阅读全文
摘要:
class Moshu{ public $number; public function __construct($str)//构造方法,new实例时,自动调用 { //require('/config.php'); $this->number=$str; } public function __d 阅读全文
摘要:
//抽象类就是一个模版 abstract class db{ /* 参数:sql语句 返回值:索引的数组 */ abstract public function test($str); //没有方法体 /* 参数:sql语句 返回值:索引的数组 */ abstract public function 阅读全文
摘要:
SELECT left(name,1) from a;//截取左边第一位字符select POSITION('.' IN name) from a;//索引返回.在字符串的位置select left(name,POSITION('.' IN name)) from a;//截取左边第几位的数字SEL 阅读全文
摘要:
start TRANSACTION; //事务处理开始UPDATE a set money =money-2 where id=1;UPDATE a set money=money+2 where id=2;COMMIT;//事务处理结束start TRANSACTION;//事务处理开始UPDAT 阅读全文