Posts

Showing posts from December, 2015

PLSQL Procedure in Erlang

Image
Functions/Procedures from Erlang: Prepare your DB: drop table employee; CREATE TABLE EMPLOYEE ( "NR" NUMBER, "FIRSTNAME" VARCHAR2(20), "LASTNAME" VARCHAR2(20), "GENDER" CHAR(1), "EXPERIENCE" NUMBER ) ; ALTER TABLE EMPLOYEE ADD PRIMARY KEY ("NR"); DROP SEQUENCE EMPLOYEE_SEQ; CREATE SEQUENCE EMPLOYEE_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 9999999999999999999999999999 MINVALUE 1 CACHE 20; create or replace TRIGGER EMPLOYEE_SEQ_TRG BEFORE INSERT ON EMPLOYEE FOR EACH ROW BEGIN <<COLUMN_SEQUENCES>> BEGIN IF INSERTING AND :NEW.NR IS NULL THEN SELECT EMPLOYEE_SEQ.NEXTVAL INTO :NEW.NR FROM SYS.DUAL; END IF; END COLUMN_SEQUENCES; END; insert into EMPLOYEE(FIRSTNAME, LASTNAME, GENDER, EXPERIENCE) values ('Richa','Vaidya','F',4); select * from EMPLOYEE; and check the output. Lets create a procedure for inserting:

Learning PHP Now ;)

Image
I am learning PHP now. Here is a basic tutorial on PHP. What all do you need to learn PHP? 1.        I am using XAMPP server : https://www.apachefriends.org/index.html Check the video on how to install XAMPP from the site. 2.        That’s it! Yes. If you install XAMPP Server for development, that’s all you need. It allows you to select all that you want to install : PHP, Perl, MySql etc. Easy to install and use. Assumptions for the tutorial: 1.        The installation directory for XAMPP is C:\xampp 2.        You have basic HTML Knowledge 3.        Other assumptions will be added as I come across them :D Starting you XAMPP: If you have checked the video on XAMPP Site, you probably have already started XAMPP and MySql Server. If you get error like: www.example.com:443:0 server certificate does NOT include an ID which matches the server name Restart xampp-control using admin user.  Your first php application can be a really simple one. I always