September 25, 2008
at 7:15 am
· Filed under CompuScriptology, Technology
An example of code colorizing MySQL table creation.
This example shows creation of a simple contact list, or client list.
1
2
3
4
5
6
7
8
9
| CREATE TABLE IF NOT EXISTS `clients` (
`id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`email_address` VARCHAR(72) character SET ASCII NOT NULL,
`firstname` VARCHAR(16) character SET utf8 NOT NULL,
`lastname` VARCHAR(20) character SET utf8 NOT NULL,
`date_added` DATETIME NOT NULL,
UNIQUE KEY `id` (`id`),
UNIQUE KEY `email_address` (`email_address`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
What’s up with IS?
I guess IN and IS are considered key words in MySQL and the Geshi Generic Syntax Highlighter colorizing library. Is that a bug in the parsing routine, or what?
Tags: Geshi, mySQL, SQL, syntax
Permalink
August 21, 2008
at 6:00 pm
· Filed under CompuScriptology, Technology, Webdesignology
This is a test of PHP Script Syntax Highlighting with the GeSHi code colorizing and syntax parsing library, along with the WP-Syntax plugin.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| //
// Include the GeSHi library
//
include_once 'geshi.php';
//
// Define some source to highlight, a language to use
// and the path to the language files
//
$source = '$foo = 45;
for ( $i = 1; $i < $foo; $i++ ){
echo "$foon"; --$foo;
}';
$language = 'php';
// Create a GeSHi object
$geshi = new GeSHi($source, $language);
// And echo the result!//
echo $geshi->parse_code(); |
Tags: code colorizing, code documenting, code examples, colorizing, computer languages, parsing, php, script examples, scripting, syntax, syntax highlighting
Permalink