The fastest easiest way to get it right.

Database Reads with SQL_OneValue

Your application code can hand a query to the server and retrieve a single value back with the SQL_OneValue() function.

<?php
class x6helloworld extends androX6 {
    function x6main() {
        # Write out a query to get just the
        # latest headline out of a table of
        # news articles.
        $view = ddView('articles')
        $sq="select headline
               from $view
              order by dateline desc
              limit 1";
        $headline=SQL_OneValue('headline',$sq);
        echo "The latest headline is: ".$headline;
    }
}
?>

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