Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Procedure on PHP

446548Jul 25 2006 — edited Jul 27 2006
I created a database on Mysql/PHP and I created a procedure in sqlplus to do some calculations in the PHP database. When I imported the procedure into PHP, It indicated a syntax error. This is the same Procedure that executed successfully in the sqlplus environment. Is there a different syntax for procedures in PHP?
The sql for the PHP database I created is below:
CREATE TABLE `movie` (
`staff id` int(2) NOT NULL,
`staff name` char(20) NOT NULL,
`staff address` varchar(50) NOT NULL,
`branch Id` int(5) NOT NULL,
`Branch address` varchar(50) NOT NULL,
`Movie Id` varchar(5) NOT NULL,
`Movie Title` varchar(20) NOT NULL,
`Date Received` date NOT NULL,
`Quantity Received` int(7) NOT NULL,
`Amount Due` int(9) NOT NULL,
`Quantity Sold` varchar(7) NOT NULL,
`Amount Remitted` varchar(9) NOT NULL,
`Date Remitted` date NOT NULL,
`Balance` int(9) NOT NULL,
`Commission Due` int(9) NOT NULL,
`Commission Paid` int(9) NOT NULL,
KEY `Quantity Sold` (`Quantity Sold`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `movie`
--
INSERT INTO `movie` VALUES (1, 'Nonye', '2 Alhaji Rahmoni Onokoya Street, Ile-Epo, Ejigbo', 23, '308 Borno Way, Alagomeji, Yaba', '25', 'Apostle Kasali', '0000-00-00', 0, 0, '100000', '1000000', '0000-00-00', 0, 0, 0);
INSERT INTO `movie` VALUES (1, 'Nonye', '2 Rahmoni Onokoya Street, Ile-Epo Ejigbo', 23, '308 Borno Way', 'Can12', 'Beyond the vow', '2006-07-25', 700000, 0, '250000', '1000000', '2006-07-24', 0, 0, 0);
INSERT INTO `movie` VALUES (3, 'Obinna', 'ef;kmjlkl raydh', 576, 'kfzn.jml/fzd', '23', 'ldmhf/zkhz', '2006-07-05', 5889, 0, '3218643', '589743', '2006-07-18', 0, 0, 0);
The syntax for the procedure I created in Oracle is below:
create or replace procedure calc
is
begin
update films
set balance = Amount Due - Amount Remitted;
end calc;
/
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2006
Added on Jul 25 2006
5 comments
1,443 views