Web hosting uk - Chapter 8: Intranet Simple Document Publisher 257 .

Chapter 8: Intranet Simple Document Publisher 257 . modifyDoc(): This method updates document information in the database. Attributes such as document ID, category number, heading, body of the document, and publish date are passed in an associative array as parameters to this method. It works as follows: The SQL statement is prepared using the $this->std_fields array that contains all the attributes of the LD_DOCUMENT table and the values from the associative array that has been passed as a parameter. The values of the parameter are formatted using the quote() method of the $this->dbi object. If the update query is successful, this method returns TRUE. Otherwise, it returns FALSE. . getDocsByCatID(): This method returns all documents that are to be published until the current time related to the given category from the database. This method takes category ID as the parameter. It works as follows: It executes a SQL statement that retrieves all the documents up to the current timestamp for the given category. It stores the result into an array if the result set is not empty. It returns the array, or, if the result is empty, it returns null. . getAllDocsByCatID(): This method returns all documents that fall under the given category. This also takes category ID as a parameter. It works as follows: It executes a SQL statement that retrieves all the documents for the given category. It stores the result into an array if the result set is not empty. It returns null if the result is empty. Otherwise, it returns the array. . getTrackDetails(): This method returns all tracking information for the given document. It works as follows: It executes a SQL query that retrieves all the user IDs and their visit timestamps for the given document ID. The result is stored in an array if it is not empty. The method returns null when the result set is empty. Otherwise, it returns the array.

Leave a Reply