Last updated
Last updated
This is for making a raw query against the database. The $query
is the statement you need to execute. The $fetch
parameter is optional only, if you want to retrieve the result of the statement just change the $fetch = "Y"
.
If $fetch = "Y"
then add the ->get();
mehod to get the result otherwise do not put ->get();
.
And this is how we retrieve the result of the query:
Another example is using the query
method to update a column data in a table.