$cellWidth = 25; $cellHeight = 25; $month = 4; $year = 2006; $dateNames[1] = "Sun"; $dateNames[2] = "Mon"; $dateNames[3] = "Tue"; $dateNames[4] = "Wed"; $dateNames[5] = "Thr"; $dateNames[6] = "Fri"; $dateNames[7] = "Sat"; $firstDate = mktime(0,0,0,$month,1,$year); // time Stamp $lastDate = mktime(0,0,0,$month + 1, 0,$year); // time Stamp $currentDate = mktime(0,0,0,$month,1-date('w',$firstDate),$year); // time Stamp echo ""; echo " "; echo "".date('F',$firstDate)." $year"; echo ""; for($i=0;$i<7;$i++){ echo " "; for($j=1;$j<=7;$j++) { if(!$i) { echo "$dateNames[$j]"; } else { echo"".date('j',$currentDate).""; $currentDate = mktime(0,0,0,date('n',$currentDate), date('j',$currentDate)+1,date("Y",$currentDate)); } } echo ""; } echo "";
Friday, April 28, 2006
PHP Script for genarate a calender
Wednesday, April 26, 2006
Script for Autoincrement : Oracle 10
DROP TABLE PROFILE;
DROP SEQUENCE AutoIncrement;
DROP TRIGGER PROFILE_TRIGGER;
CREATE TABLE PROFILE
(
DROP SEQUENCE AutoIncrement;
DROP TRIGGER PROFILE_TRIGGER;
CREATE TABLE PROFILE
(
ID NUMBER PRIMARY KEY,
PROFILENAME VARCHAR2(25),
FONT VARCHAR2(25),
DEFAULT_PADDING NUMBER,
FONT_SIZE NUMBER
);
CREATE SEQUENCE AUTOINCREMENT
start with 1
increment by 1
nomaxvalue;
CREATE TRIGGER PROFILE_TRIGGER
BEFORE INSERT
ON PROFILE
REFERENCING NEW AS NEW
FOR EACH ROW BEGIN
SELECT AUTOINCREMENT.nextval INTO :NEW.ID FROM dual;
END;
INSERT INTO PROFILE(PROFILENAME) VALUES('some value one');
INSERT INTO PROFILE(PROFILENAME) VALUES('some value two');
SELECT * FROM PROFILE;
Subscribe to:
Posts (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...