Useful PHP database class

前端 未结 11 1197
生来不讨喜
生来不讨喜 2021-02-06 06:21

I am working on a small PHP website. I need a MySql database access class that is easy to configure and work with.

Does not need to be a full framework, I only need a ma

11条回答
  •  北恋
    北恋 (楼主)
    2021-02-06 06:56

    The simplest and lightweight db class is

    http://code.google.com/p/edb-php-class/

     q("select * from `users`limit 3");
    
        foreach($result as $a){
                $a = (object) $a;
                echo $a->id.' '.$a->name.' '.$a->url.' '.$a->img.'
    '; } $result = $db->line("select * from `users` where id = '300' limit 1"); echo $result['name']; echo $result['surname']; $name = $db->one("select name from `ilike_pics` where id = '300' limit 1"); echo $name; ?>

提交回复
热议问题