-5

I have a PL/SQL Sequence in oracle . I use oracle DB and php The code is as follows-

CREATE SEQUENCE SEQ_ID
START WITH 1
INCREMENT BY 1
MAXVALUE 99999999
MINVALUE 1
NOCYCLE;

insert values in column like this

UPDATE tableName SET columnName = seq_test_id.NEXTVAL

How can i implement it in php oci_parse

1 Answers1

0

Assuming you're going to Oracle, just set up the statement, parse, and execute. There's no need to do any binding because you have no bind variables. This is adapted from the PHP documentation of oci_parse:

$conn = oci_connect(your username, your password, your database);
$stid = oci_parse($conn, 'UPDATE tableName SET columnName = seq_test_id.NEXTVAL');
oci_execute($stid);
Ed Gibbs
  • 25,239
  • 3
  • 44
  • 63