Update of /cvsroot/openfirst/news
In directory sc8-pr-cvs1:/tmp/cvs-serv13330
Modified Files:
viewnews.php
Log Message:
Replace mysql functions with new database functions, allowing multiple database types to be used easily.
Index: viewnews.php
===================================================================
RCS file: /cvsroot/openfirst/news/viewnews.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** viewnews.php 29 Jul 2003 15:32:49 -0000 1.3
--- viewnews.php 23 Aug 2003 20:25:13 -0000 1.4
***************
*** 27,41 ****
*/
- mysql_select_db($sqldatabase,$sqlconnection);
-
function shownews($limit = 5) {
// Get a list of the users able to
// be contacted via the feedback form.
! $query = mysql_query("SELECT * FROM ofirst_news ORDER BY ID DESC LIMIT $limit;");
! if (mysql_num_rows($query) != 0){
! while($news = mysql_fetch_object($query)){
echo("<table>
<tr><th> </th><th><strong>$news->title</strong></th></tr>
--- 27,39 ----
*/
function shownews($limit = 5) {
// Get a list of the users able to
// be contacted via the feedback form.
! $query = ofirst_dbquery("SELECT * FROM ofirst_news ORDER BY ID DESC LIMIT $limit;");
! if (ofirst_dbnum_rows($query) != 0){
! while($news = ofirst_dbfetch_object($query)){
echo("<table>
<tr><th> </th><th><strong>$news->title</strong></th></tr>
|