Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Use Where in updateBatch (CI 4.3.3)
Post: RE: Use Where in updateBatch (CI 4.3.3)

Just add the condition with onConstraint() it will accomplish the same thing. /* * IT COULD PRODUCE: * * UPDATE `test` * INNER JOIN ( * SELECT '22' `course_id`, '34' `question_id`, '80' `min_s...
3,695 Views
5 Replies
07-08-2024, 03:26 PM
sclubricants
    Thread: Type casting in PostgreSQL with updateBatch()
Post: RE: Type casting in PostgreSQL with updateBatch()

The quick and easy fix for this is to use RawSql as well as casting your php values: Code: -- $data = [ [ 'name' => 'Derek Jones'...
11,580 Views
24 Replies
01-19-2024, 03:25 PM
sclubricants
    Thread: SQL query with 1 fixed and 2 OR conditions
Post: RE: SQL query with 1 fixed and 2 OR conditions

You need to use Query Grouping. See https://www.codeigniter.com/user_guide/database/query_builder.html#group Code: --
660 Views
1 Replies
11-21-2023, 11:58 AM
sclubricants
    Thread: [SOLVED] SQLite3 Error
Post: RE: SQLite3 Error

Try: Code: -- $this->db->table('formula')->insertBatch([ ['url_id' => 1, 'source_id' => 1, 'medium_id' => 1, 'content_1_id' => 1, 'content_2_id' => 1, 'content_4_id' => null], ['url_id' => 1, 's...
1,166 Views
3 Replies
11-20-2023, 01:08 PM
sclubricants
    Thread: [SOLVED] SQLite3 Error
Post: RE: SQLite3 Error

Your dataset for insertBatch() is not symmetrical. You must use symmetrical data for any of the *Batch() methods. You need to define content_4_id in the first and second row as well.
1,166 Views
3 Replies
11-20-2023, 01:01 PM
sclubricants

Theme © iAndrew 2016 - Forum software by © MyBB