This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s SELECT * FROM ${Table} | |
u UPDATE ${Table} SET ${columnValue} WHERE ${WhereClause} | |
d DELETE FROM ${Table} WHERE ${WhereClause} | |
i INSERT INTO ${Table} ${columns} VALUES (${values}); | |
g GRANT ${Permissions} ON ${DbObject} ${ObjectName} TO ${User} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*************** Beginning of data ******************************************** | |
PGM PARM(&FILENAME) | |
/* VARS */ | |
DCL VAR(&FILENAME) TYPE(*CHAR) LEN(80) | |
DCL VAR(&PHPCLIPATH) TYPE(*CHAR) LEN(128) | |
/* VARS FOR TRIM */ | |
DCL VAR(&LEN) TYPE(*DEC) LEN(2 0) | |
DCL VAR(&NULL) TYPE(*CHAR) LEN(128) VALUE(X'00') /*TERMINATE VAR WITH NULL */ | |
DCL VAR(&NULL1) TYPE(*CHAR) LEN(1) VALUE(X'00') | |
DCL VAR(&CHR15) TYPE(*CHAR) LEN(15) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL & ~E_NOTICE); | |
ini_set('display_errors', TRUE); | |
ini_set('display_startup_errors', TRUE); | |
for ($index = 0; $index < 10000; $index++) | |
{ | |
$insertdata[] = array('test'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
//Add commitment control to the DB2 Connect by using i5_commit | |
//Apparently you can't set this using ini_set. Therefore this would have to be set in the PHP.ini | |
//ini_set('ibm_db2.i5_allow_commit',1); | |
ini_set('ibm_db2.autocommit',DB2_AUTOCOMMIT_OFF); | |
$options = array('i5_lib' => 'MYLIB','autocommit' => DB2_AUTOCOMMIT_OFF,'i5_commit' => DB2_I5_TXN_SERIALIZABLE); | |
//Connect to DB2 - Commitments wont take place until we call | |
//db2_commit($db2Connection) on the connection. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$server = db2_server_info( $db2Connection ); | |
var_dump($server);exit(); | |
//DFT_ISOLATION and ISOLATION_OPTION should be looked at | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Bind to CTRL+S key | |
~^S:: | |
;If Netbeans is active (SunAwtFrame) is a class, you could change this to the actual title but you'll have to update the script more often | |
IfWinActive, ahk_class SunAwtFrame | |
{ | |
;Msbox for debugging purposes. ; is used to comment it out | |
;MsgBox NetBeans Active | |
;Activate Firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT a.*, b.NumberOfRows | |
FROM MYTABLE a | |
CROSS JOIN (SELECT COUNT(*) AS NumberOfRows FROM MYTABLE) b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(unlink("test.txt")) | |
echo "true"; | |
else | |
echo "false"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM MYTABLE | |
WHERE TRANSLATE (MYTABLE.MYFIELD, 'NNNNNNNNNNX', '1234567890N') = 'NNNNN' AND MYTABLE.MYFIELD<10000 | |
--MYFIELD is a CHAR(5) field and is being compared against 5 'N's |