时间:2021-07-01 10:21:17 帮助过:20人阅读
求推荐,谢谢各位
直接把ci的扒出来用。我以前扒过
直接把ci的扒出来用。我以前扒过
水平有限,扒了一次没成功,不过真心觉得ci的数据库类写的不错
直接把ci的扒出来用。我以前扒过
水平有限,扒了一次没成功,不过真心觉得ci的数据库类写的不错
实在不行 这周末我就重新扒一次共享一下
medoo 不就很好的吗?
medoo 是有 order by 的( http://medoo.in/api/where)
$database->select("account", "user_id", [ "GROUP" => "type", // "ORDER" => "age DESC" "ORDER" => "age", // Must have to use it with ORDER together "HAVING" => [ "user_id[>]" => 500 ], // LIMIT => 20 "LIMIT" => [20, 100]]);// SELECT user_id FROM account// GROUP BY type// ORDER BY age// HAVING user_id > 500// LIMIT 20,100
medoo 不就很好的吗?
medoo 是有 order by 的( http://medoo.in/api/where)
$database->select("account", "user_id", [ "GROUP" => "type", // "ORDER" => "age DESC" "ORDER" => "age", // Must have to use it with ORDER together "HAVING" => [ "user_id[>]" => 500 ], // LIMIT => 20 "LIMIT" => [20, 100]]);// SELECT user_id FROM account// GROUP BY type// ORDER BY age// HAVING user_id > 500// LIMIT 20,100
CI 的数据库类也不需要扒吧?
不就在 system/database 中么
CI 的数据库类也不需要扒吧?
不就在 system/database 中么
貌似牵扯一些其他文件的方法调用
没用过,不是很清楚,应该只和配置文件有关吧
只不过调用是透明的
这个很不错呀
pdo_query('show databases '); var_dump( $sql, $db->dbVersion() ); exit; $sql = $db->select( 'i.kd k, io.id dk, iil.ii ds' )->from( 'test t' ) ->leftjoin( 'post p', 't.id = ?', array( 2 ) ) ->order( 'name DESC, id ASC' ) ->where( array( 'xin = ? AND do > ?' => array( 1,3 ))) ->having( array('xin' => 'dkls' )) ->group( 'id' ) ->limit( 3,4 ) ->queryAll();exit;//var_dump( $sql ); $sql = $db->from( 'test') ->insert( array( 'kd' => '233', 'dkwe' => 323 )); $sql = $db->from( 'test' ) ->where( array( '( dk = ? and kd > ?) or ( dk = ? and ddd = ?)' => array( 2,3,5,4 ))) ->limit( 2 , 4 ) ->update( array( 'dkddl' => 'd', 'kdls' => 'dkdl' )); $sql = $db->from( 'test,test' ) ->select( 'test,test' ) ->where( array( 'id' => array( 3,3,4,2,3) )) ->limit( '3', 3) ->delete();