topical media & game development
professional-web-01-v1-watch.php / php
<?php
global HTTP_RAW_POST_DATA))
db = new SQLiteDatabase("/tmp/db", 0666, sqliteerror);
}
db->query("SELECT name FROM sqlite_master WHERE type='table'", SQLITE_NUM);
query->fetchAll(SQLITE_NUM);
result as tables[]=tables)){
db;
}
function write() {
global db=openDb();
dom->loadXML(dom->relaxNGValidate ( 'watch.rng')) {
die("unvalid document");
}
dom);
foreach (element) {
element));
}
//echo
query = xml->symbol['escaped'].
"'",
SQLITE_NUM);
query->fetch()) {
req .= "tag='".req .= "title='".req .= "description='".req .= "where symbol='".req="insert into watches (symbol, tag, title, description) values (";
xml->symbol['escaped']."', ";
xml->tag['escaped']."', ";
xml->title['escaped']."', ";
xml->description['escaped']."')";
}
//echo
db->queryExec(row) {
xml->symbol=xml->tag=xml->title=xml->description=asXML = asXML, strpos(db=openDb();
db->query(
"SELECT * from watches where symbol='".
sqlite_escape_string(trim(row = row);
} else {
asXML = asXML, strpos(db=openDb();
echo "<watches>";
db->query("SELECT * from watches order by symbol", SQLITE_ASSOC);
while (query->fetch(SQLITE_ASSOC)) {
displayOne(HTTP_RAW_POST_DATA)>0) {
write();
} else if (
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.