<?php
 
/*
 
 *     ALTS - Another Little Testing Script
 
 *  Bla bla bla... I never know what to write here...
 
 * 
 
 */
 
 
include("class.mysql_query.php");
 
 
 
$my = new mysql_query("insert", "SELECT * FROM FooBar WHERE Foo = 'Bar'", "");
 
    // Generate my queries from a select-statement please... Oh, and make it an insert-query... thanks.
 
$my->setKey("Foo1", "1"); // <-- to demonstrate the difference in handling numeric/alphanumeric values :)
 
$my->setKey("Foo2", "Bar2");
 
    // These are the values I'd like to insert.
 
$my->generateQuery();
 
    // Generate me a query then. C'mon, show me your power..
 
echo $my->query;
 
    // Wow, thanks... 
 
    
 
echo "<br>"; // There should be a PHP command br(); which does this :)
 
 
$my->type = "update";
 
    // Let's see how you handle an update-query then?
 
$my->generateQuery();
 
    // Hey, that's right, you already know what to do so nothing else needs to be inserted...
 
echo $my->query;
 
    // Cool... thanks again...
 
 
echo "<br>";
 
 
$my->type = "delete";
 
    // But can you do a delete?
 
$my->generateQuery();
 
    // Guess so...
 
echo $my->query;
 
    // Yeah yeah, I'll just take you for granted now thank you.
 
?>
 
 |