I have a key ID which would be an auto-incremented unique ID for a Firebird database, and I have a generator made in firebird, already working perfectly, and I want to write the ID in the db for new records. So basically I want to get the correct value with this incrementer generator, but I don't know how to call. PRODUCT_SORSZAM is the generator.
$q = ibase_query("SELECT * FROM PRODUCT_SORSZAM");
echo $q;
You can use following to get next generator value:
SELECT GEN_ID(PRODUCT_SORSZAM,1) FROM RDB$DATABASE; Or
SELECT NEXT VALUE FOR PRODUCT_SORSZAM FROM RDB$DATABASE;
I assume that PRODUCT_SORSZAM is name of generator, not the name of table.