有沒有好用的開源的php mysql class,類似medoo

來源:互聯網
上載者:User
有沒有好用的開源的php mysql class,類似medoo的那種

但是medoo沒有 orderby limit 等功能

CI架構中的db類比較好用,但是我想脫離ci去用他的db類,現在還做不到


有沒有知道其他的好用的mysql class,最好是開源的成熟的


回複討論(解決方案)

求推薦,謝謝各位

直接把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();


http://php.xlxz.org/2013/11/370/
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.