Welcome Guest, Not a member yet? Register   Sign In
how to get limited number of records and order by rand ?
#2

1)you might be able to do something like lever use of
Code:
rand($min,$max)

and use codeigniter built in models utility :
Code:
public function getOne($id)
       {
      
      return $this->find($id);
          
       }

you would have to do count but id might not start with min nor end with max.

2)this is how i set out my assetts:

Code:
public
├── blogImages //dir
├── captcha   //dir
├── css       //dir
├── errors
├── favicon.ico
├── fonts  //dir
├── images   //dir
├── index.php
├── js    //dir
├── minCss   //dir
├── portfolio //dir
├── robots.txt
└── sounds    //dir

eg in js I have


Code:
js
│   ├── bk
│   ├── bootstrap.bundle.js
│   ├── jquery-3.5.1.min.js
│   ├── jquery-migrate-3.3.0.js
│   ├── jquery-migrate.js
│   └── popper.js
Reply


Messages In This Thread
RE: how to get limited number of records and order by rand ? - by captain-sensible - 11-06-2020, 12:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB