The fastest easiest way to get it right.

Database Updates

Database updates can be made manually with the SQL() function, but this can be tedious and error-prone. The SQL function SQLX_Update() is a much easier way to do updates.

<?php
class x6example extends androX6 {
    function x6main() {
        $row = array(
            skey=>1234
            ,'headline'=>"Now Available: SQLX_Update"
        );
        SQLX_Update('articles',$row);
    }    
}

The SQLX_Update function automatically escapes all values, so you do not need to worry about protecting against SQL Injection.

The SQLX_Update function knows about row security and column security. You can name the base table in the function and not worry about which view needs to be used.

The SQLX_Update function quietly discards elements from the array that cannot be directly assigned by the user, such as FETCH values or values calculated with a CHAIN.

The SQLX_Update function quietly discards elements from the array that do not match an actual column in the destination table.

The SQLX_Update function does not trim values, if you provide a value that is too long for a column, it will throw out an error.

SQLX_Update requires either an skey value or all values of the primary key. If neither of these is provided, it will not perform and update.

User Comments

There are no user comments yet on this page.


Add A Comment

Comments will not appear until after they are moderated. Comments are usually moderated within a few hours on weekdays, but may take longer on weekends and holidays.

Name or nickname: (This will appear with your comment)


Email (this will never be displayed)


Enter your comment here. Use [b] and [/b] for bold, [i] and [/i] for italic, and [pre] and [/pre] for code samples. All literal HTML and PHP that you enter will be escaped out and displayed as you enter it.


Home |  Documentation |  Download |  Credits |  Contact |  Login
Andromeda © Copyright 2004-2010, Licensed under the GPL Version 2