首页  >  文章  >  php教程  >  php函数分解SQL语句

php函数分解SQL语句

WBOY
WBOY原创
2016-06-06 19:42:181074浏览

例如 var_dump( split_sql( " insert into abc values ('asjoha ;ighuasdf;as' ,'urwqur;'); select hahaha from abc where qwe='dk;h';")); 会输出 array(2){ [0]= string(60) " insert into abc values ('asjoha ;ighuasdf;as' ,'urwqur;');" [1]= string(

例如

var_dump( split_sql( "  insert into abc values

('asjoha   ;ighuasdf;as' ,'urwqur;');

select hahaha from abc where qwe='dk;h';"));

 

会输出

array(2){

  [0]=>

  string(60) "  insert into abc values

('asjoha   ;ighuasdf;as' ,'urwqur;');"

  [1]=>

  string(41) "

select hahaha from abc where qwe='dk;h';"

}

要这样分解!不要像一楼!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn