mercredi 29 mai 2019

How does Laravel's ORM specify the sorted values for the data?

E.g: There is a field in the table called name, Name contains some user names, for example:

| name |
---------
| Asal |
| Codaya |
| Ostily |
| Queen |
| Qta |
| Zoo |


What do you want to achieve, for example, I am passing a value now, for example, passing Q, then the returned data, that is, all the first letters Q are in front, like this:

| name |
-------------
| Queen |
| Qta |
| Asal |
| Codaya |
| Ostily |
| Zoo |


If you pass in a Z, it becomes like this:

| name |
------------
| Zoo |
| Asal |
| Codaya |
| Ostily |
| Queen |
| Qta |


How is this requirement implemented in mysql?



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2VZG4y6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire