$output .= \n ?; //look at each fieldforeach ($row
October 28, 2006 on 4:30 am | In php |$output .=
\n ?; } // end foreach$output .=
\n\n ?; }// end while$output .=
\n ?; return $output; } // end qToTableThe viewQuery.phpprogram calls the qToTable()function, but it could be usedanytime you want an SQL query formatted as an HTML table (which turns out tobe quite often). Building an HTML Table for Editing an SQL TableIf the user has appropriate access, she should be allowed to add, edit, or deleterecords in any table of the database. While qToTable()is suitable for viewing theresults of any SQL query, it does not provide these features. The tToEdit()functionis based on qToTable()with a few differences: tToEdit()does not accept a query, but the name of a table. You cannotedit joined queries directly, only tables, so this limitation is sensible. tToEdit()creates a query that returns all records in the specified table. In addition to printing the table data, tToEdit()adds two forms to eachrecord. One form contains all the data needed by the editRecord.phpprogramto begin the record-editing process. The other form added to each record sends all data necessary for deleting a record and calls the deleteRecord.phpprogram. One more form at the bottom of the HTML table allows the user to add a recordto this table. This form contains information that the addRecord.phpprogramneeds. function tToEdit($tableName){ //given a table name, generates HTML table including//add, delete and edit buttonsglobal $dbConn; 410PHP5/MySQLProgrammingfortheAbsoluteBeginner
Hint: This post is supported by Gama hrvatski web hosting services
WordPress database error: [Table './sandzak_com_-_blog/wp_comments' is marked as crashed and should be repaired]
SELECT * FROM wp_comments WHERE comment_post_ID = '497' AND comment_approved = '1' ORDER BY comment_date
No Comments yet
Sorry, the comment form is closed at this time.
Powered by cheap hosting