Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Help writing Sql with CI4 active record
Post: Help writing Sql with CI4 active record

Hello. I 'm struggling to write sql with subquery, How can I write it with codeigniter methods. Thanks! //SQL PHP Code: -- SELECT p.id, p.catId, p.image, c.id, (c.name) as category             ...
459 Views
2 Replies
03-25-2021, 01:13 AM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: RE: Help with Codeigniter v4 pagination Library

Thank you all for the support and help, I carefully followed your device and I get a solution to my issue. I'd like to hear if this solution has no down effect to the app performance. Here is what...
855 Views
6 Replies
03-23-2021, 06:16 AM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: RE: Help with Codeigniter v4 pagination Library

InsiteFX Wrote: (03-22-2021, 08:47 PM) -- Pager works just fine with Query Builder, do what you want in the model with Query Build but do not tell it to return a result set instead return $this Then...
855 Views
6 Replies
03-23-2021, 12:49 AM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: RE: Help with Codeigniter v4 pagination Library

php_rocs Wrote: (03-22-2021, 08:59 AM) -- @venance, ...or use something like DataTables (https://datatables.net/) -- I know the datatable is great, But I really don't like. I like codeigniter 4 pa...
855 Views
6 Replies
03-22-2021, 12:12 PM
venance
    Thread: Help with Codeigniter v4 pagination Library
Post: Help with Codeigniter v4 pagination Library

Hello, I found pagination library for Codeigniter v4 on github with this link https://github.com/KejawenLab/CI4Pager (https://github.com/KejawenLab/CI4Pager) . I followed every step, But I get issue o...
855 Views
6 Replies
03-22-2021, 08:27 AM
venance
    Thread: how to write this sql with active record
Post: RE: how to write this sql with active record

php_rocs Wrote: (03-18-2021, 11:35 AM) -- @venance, Have you considered using something like Datatables (https://datatables.net/)?  Then you don't have to worry about pageination. Or you could ...
602 Views
4 Replies
03-18-2021, 12:38 PM
venance
    Thread: how to write this sql with active record
Post: RE: how to write this sql with active record

php_rocs Wrote: (03-18-2021, 08:09 AM) -- @venance, Have you thought about using query binding (https://codeigniter.com/user_guide/database/queries.html?highlight=sql#query-bindings) instead?  Thi...
602 Views
4 Replies
03-18-2021, 08:23 AM
venance
    Thread: how to write this sql with active record
Post: how to write this sql with active record

Hello everyone, I'm trying to calculate profit from two tables province_income and province_expenses. But I'm getting difficult to organize sql statement with ci4 query methods to make it work. Help...
602 Views
4 Replies
03-18-2021, 01:47 AM
venance
    Thread: How to get data of joined table using query() method
Post: RE: How to get data of joined table using query() ...

iRedds Wrote: (02-22-2021, 05:12 AM) -- I already told you that query() and paginate() are not linked and cannot be linked in principle. You have two options, either use QueryBuilder or implement th...
630 Views
6 Replies
02-22-2021, 06:04 AM
venance
    Thread: How to get data of joined table using query() method
Post: RE: How to get data of joined table using query() ...

iRedds Wrote: (02-22-2021, 04:04 AM) -- venance Wrote: (02-22-2021, 03:51 AM) -- Thank you, But all I need here is to use query() method to get the same result. How can I do because it only see the ...
630 Views
6 Replies
02-22-2021, 04:25 AM
venance
    Thread: How to get data of joined table using query() method
Post: RE: How to get data of joined table using query() ...

Thank you, But all I need here is to use query() method to get the same result. How can I do because it only see the first table with defined property protected $table = "category:"
630 Views
6 Replies
02-22-2021, 03:51 AM
venance
    Thread: How to get data of joined table using query() method
Post: How to get data of joined table using query() meth...

Hello everyone. I have an issue with getting data of the joined table if I use query(). I did not get the data of product table, how can I solve this using query() without using Active record? Here i...
630 Views
6 Replies
02-22-2021, 12:18 AM
venance
    Thread: How to use AS keyword and Aliases sql with query()
Post: RE: How to use AS keyword and Aliases sql with que...

I get result if I use paginate() and output . But the issue I get if I try to use a renamed table field . I get error " Undefined property: stdClass::$name". I cant figure out what cause this issue....
989 Views
10 Replies
02-20-2021, 09:31 PM
venance
    Thread: How to use AS keyword and Aliases sql with query()
Post: RE: How to use AS keyword and Aliases sql with que...

iRedds Wrote: (02-20-2021, 10:49 AM) -- The query() method immediately runs a database query. But you don't get the result. Use the select() method instead PHP Code: -- ->select('column as name',...
989 Views
10 Replies
02-20-2021, 11:50 AM
venance
    Thread: How to use AS keyword and Aliases sql with query()
Post: RE: How to use AS keyword and Aliases sql with que...

iRedds Wrote: (02-20-2021, 10:49 AM) -- The query() method immediately runs a database query. But you don't get the result. Use the select() method instead PHP Code: -- ->select('column as name',...
989 Views
10 Replies
02-20-2021, 11:48 AM
venance
    Thread: How to use AS keyword and Aliases sql with query()
Post: RE: How to use AS keyword and Aliases sql with que...

php_rocs Wrote: (02-20-2021, 10:02 AM) -- @venance, Did you verify that the output from the query used the field names that you used in your query?  Did you run the query (in phpMyAdmin/or databas...
989 Views
10 Replies
02-20-2021, 10:32 AM
venance
    Thread: How to use AS keyword and Aliases sql with query()
Post: RE: How to use AS keyword and Aliases sql with que...

php_rocs Wrote: (02-20-2021, 10:02 AM) -- @venance, Did you verify that the output from the query used the field names that you used in your query?  Did you run the query (in phpMyAdmin/or databas...
989 Views
10 Replies
02-20-2021, 10:21 AM
venance
    Thread: How to use AS keyword and Aliases sql with query()
Post: How to use AS keyword and Aliases sql with query()

Hi, I have a problem with query() when trying to execute my statement with "AS" keyword, Seem like renaming db table column like this Model: public function test(){ $this->db->query("SELECT column...
989 Views
10 Replies
02-20-2021, 06:03 AM
venance

Theme © iAndrew 2016 - Forum software by © MyBB