insertedid is not working
Inside readme in Insert section :-
$data = array( 'name' => 'Sana', 'description' => 'Blah' );
$insertId = QB::table('my_table')->insert($data); echo $insertId ;
Output: ""
@rash039 can you post your table structure. Also what PHP version are you running?
@TCB13 PHP version:
PHP 5.3.8 (cli)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
Database:
PostgreSQL
Version:
psql (PostgreSQL) 9.3.6
Table structure:
CREATE TABLE ayushakti_patients_therapists_list (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
msisdn BIGINT NOT NULL,
custid integer,
therpistids VARCHAR(255),
feedback VARCHAR(255),
feedback_time timestamp without time zone,
timestamp timestamp without time zone default now()
);
CREATE INDEX ayushakti_patients_therapists_list_index ON ayushakti_patients_therapists_list(Id) ;
@rash039 I can't confirm this but this is probably a bug with your old php version / database. In modern versions with mysql it is working properly.
@rash039 can you test the fix in #147 ?
@TCB13
Still getting Uncaught PDOException: SQLSTATE[55000]: Object not in prerequisite state: 7 ERROR: lastval is not yet defined in this session with with latest master in PSQL 10.4.
Can anyone confirm this ?
Are there any possible solutions for this issue ?