Posted on August 11, 2008 by Joey
Constraints define conditions about a database that must remain true. They are used to ensure data integrity. Commonly used constraints are primary key constraints, foreign key constraints, and unique constraints. Constraints are also used to enforce non-null column values.
A constraint is typically defined as part of the table definition as is created using something similar [...]
Filed under: Oracle, Programming, SQL, pl/sql | Tagged: constraints, database, Oracle | 1 Comment »
Posted on August 9, 2008 by Bryan
In ColdFusion, it is generally a good idea to prefix your variables.
Why? Performance and Ambiguity.
Performance
If you set a variable and then tried to output it:
<cfset myvariable = “my value”>
<cfoutput>#myvariable#</cfoutput>
ColdFusion will look into each scope until it finds the variable.
ColdFusion searches for variables without a scope the following order:
Query result (in a <cfoutput> loop)
Arguments (within a [...]
Filed under: ColdFusion | Tagged: cf, ColdFusion, scopes, search order, variables | 1 Comment »
Posted on August 6, 2008 by Bryan
In PHP, the operator to concatenate or combine strings together is: . (dot)
Here are some examples of usage when concatenating strings:
<?php
$string1 = ‘tech’;
$string2 = ’saints’;
$string3 = ‘.com’;
$full = $string1.$string2.$string3;
echo $full;
?>
Result: techsaints.com
<?php
$string = ‘techsai’;
$string .= ‘nts’;
$string .= ‘.com’;
echo $str;
?>
Result: techsaints.com
<?php
$num = 123;
$string = $num.’ is a number’;
echo $string;
?>
Result: 123 is a number
When concatenating a number and [...]
Filed under: php | Tagged: combining, concat, concatenate, concatenating, php, strings | Leave a Comment »
Posted on August 5, 2008 by Joey
The Oracle varchar2 data type allows for the storage of up to 4000 bytes of character data. It can be defined for a column as follows:
MyColumn varchar2(100) DEFAULT ‘MyString’ NOT NULL;
Note that the varchar data type is now deprecated in Oracle as it’s usage has become a synonym for varchar2, although this may change in [...]
Filed under: Oracle, pl/sql | Leave a Comment »