The mainButton()function uses the value of $mainProgramto build

October 27, 2006 on 6:14 pm | In php |

$output = ?; $result = mysql_query($query, $dbConn); //print dbConn is $dbConn
?; //print result is $result
?; while ($row = mysql_fetch_assoc($result)){ foreach ($row as $col=>$val){ $output .= $col: $val
\n ?; } // end foreach$output .=


\n ? ; } // end whilereturn $output; } // end qToListBuilding an HTML Table from a QueryThe qToTable()function is a little more powerful than qToList(). It can build an HTML table from any valid SQL SELECTstatement. The code uses themysql_fetch_field()function to determine field names from the query result. Italso steps through each row of the result, printing an HTML row correspondingto the record. function qToTable($query){ //given a query, automatically creates an HTML table outputglobal $dbConn; $output = ?; $result = mysql_query($query, $dbConn); $output .=
\n ?; //get column headings//get field names$output .=
\n ?; while ($field = mysql_fetch_field($result)){ $output .=

\n ?; } // end while$output .=

\n\n ?; //get row data as an associative arraywhile ($row = mysql_fetch_assoc($result)){

Note: If you are looking for good and affordable webspace to host and run your servlet application check Virtualwebstudio servlet 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 = '496' AND comment_approved = '1' ORDER BY comment_date

No Comments yet

TrackBack URI

Sorry, the comment form is closed at this time.

Powered by cheap hosting

$field->name