src/snac/server/database/SQL.php
/**
     * Insert Message
     *
     * Writes the given message data into the database as a new message.
     *
     * @param int $toUser The user id this message is directed to
     * @param int $fromUser The user id this message is from
     * @param string $fromString The string representation this message is from (if no user, such as feedback from IP address)
     * @param string $subject The subject of the message
     * @param string $body The body of the message (HTML)
     * @param string $attachmentContent The attached file encoded as a string
     * @param string $attachmentFilename The filename to give the attachment on reading
     * @return boolean True if succeeded, false otherwise
     */
Insert Message
Writes the given message data into the database as a new message.


Insert Message Writes the given message data into the database as a new message .
public function insertMessage($toUser,
                                    $fromUser,
                                    $fromString,
                                    $subject,
                                    $body,
                                    $attachmentContent,
                                    $attachmentFilename) {
        try {
            $this->sdb->prepare("insert_message",'insert into messages
                    (to_user, from_user, from_string, subject, body, attachment_content, attachment_filename)
                    values ($1, $2, $3, $4, $5, $6, $7);');
            $this->sdb->execute("insert_message",
                array($toUser, $fromUser, $fromString, $subject, $body, $attachmentContent, $attachmentFilename));
        } catch (\snac\exceptions\SNACDatabaseException $e) {
            return false;
        }
        return true;
    }
public function insertMessage ( $ toUser , $ fromUser , $ fromString , $ subject , $ body , $ attachmentContent , $ attachmentFilename ) { try { $ this -> sdb -> prepare ( " insert_message " , 'insert into messages
                    (to_user, from_user, from_string, subject, body, attachment_content, attachment_filename)
                    values ($1, $2, $3, $4, $5, $6, $7);' ) ; $ this -> sdb -> execute ( " insert_message " , array ( $ toUser , $ fromUser , $ fromString , $ subject , $ body , $ attachmentContent , $ attachmentFilename ) ) ; } catch ( \ snac \ exceptions \ SNACDatabaseException $ e ) { return false ; } return true ; }
Insert Message
 Writes the given message data into the database as a new message.
Insert Message Writes the given message data into the database as a new message .