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
<cfsetting requesttimeout="600"> | |
<cfparam name="thelogname" default="clean_maillogH.log"> | |
<cfinclude template="stopwatch.cfm"> | |
<cfset ds = "dev_bktools"> | |
<cfset stopwatch = makeStopwatch()> | |
<cfoutput> | |
<cfset stopwatch.start("Begin timing")> |
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
if ( len(arguments.email) lte 5) { | |
// email too short | |
return 0; | |
} | |
else if ( len(arguments.password) eq 0 ) { | |
// empty password | |
return 0; | |
} | |
else { | |
var userDAO = uDAO; |
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
if ( len(arguments.email) gt 5) { | |
if ( len(arguments.password) eq 0 ) { | |
var userDAO = uDAO; | |
var user = userDAO.getUserByLogin( arguments.email, arguments.password ); | |
if ( user.recordcount gt 0) | |
if ( user.deletedat gt "") { | |
//login successful | |
return user.id; | |
} | |
else { |
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
db.readTransaction(function (tx) { | |
tx.executeSql('SELECT * FROM doctors', [], function( tx, res ){ console.log(res.rows.item(0).doctorName); } ); | |
}); | |
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
db.transaction(function (tx) { | |
tx.executeSql(’SELECT * FROM doctors’, | |
[], | |
function( tx, result ){ | |
var len = results.rows.length, i; | |
for (i = 0; i < len; i++) { | |
console.log(results.rows.item(i).doctorName); | |
} | |
}, | |
function( tx, error ){} |
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
db.transaction(function (tx) { | |
tx.executeSql('CREATE TABLE IF NOT EXISTS doctors (id unique, doctorName)’); | |
tx.executeSql(‘INSERT INTO doctors (id, doctorName) values(?,?)’, [1,”9th Doctor”]); | |
}); |
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
db.transaction(function (tx) { | |
tx.executeSql('CREATE TABLE IF NOT EXISTS doctors (id unique, doctorName)’); | |
tx.executeSql(‘INSERT INTO doctors (id, doctorName) values(1,”9th Doctor”)'); | |
}); |
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
var dbSize = 5 * 1024 * 1024; // 5mb initial database | |
var db = openDatabase(“GavinsDB", "", “Gavins DB", dbSize, | |
function() { | |
console.log('db successfully opened or created'); | |
}, | |
function() { | |
console.log('db error'); | |
} | |
); |
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
db.transaction(function (tx) { | |
tx.executeSql('CREATE TABLE doctors (id unique, doctorName)'); | |
}); |
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
db.transaction(function (tx) { | |
tx.executeSql('CREATE TABLE IF NOT EXISTS doctors (id unique, doctorName)'); | |
}); |
OlderNewer