src/snac/server/database/SQL.php
/**
     * Select Message by ID
     *
     * Reads the message data out of the database for the given ID.
     *
     * @param int $id The message ID to read
     * @return string[] The message data
     */
Select Message by ID
Reads the message data out of the database for the given ID.

@param int $id The message ID to read
@return string[] The message data
Select Message by ID Reads the message data out of the database for the given ID . @param int $id The message ID to read @return string [] The message data
public function selectMessageByID($id) {
        $result = $this->sdb->query(
            'select m.*,to_char(m.time_sent, \'YYYY-MM-DD"T"HH24:MI:SS\') as sent_date from messages m where m.id = $1',
            array($id));
        $all = array();
        while ($row = $this->sdb->fetchrow($result))
        {
            array_push($all, $row);
        }
        if (count($all) === 1)
            return $all[0];
        return array();
    }
public function selectMessageByID ( $ id ) { $ result = $ this -> sdb -> query ( 'select m.*,to_char(m.time_sent, \'YYYY-MM-DD"T"HH24:MI:SS\') as sent_date from messages m where m.id = $1' , array ( $ id ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row ) ; } if ( count ( $ all ) === 1 ) return $ all [ 0 ] ; return array ( ) ; }
Select Message by ID
 Reads the message data out of the database for the given ID.
Select Message by ID Reads the message data out of the database for the given ID .