Re: what is wrong with my php code?
| From: | John Nichel | Date: | Mon, 03 May 2004 17:46:53 +0000 |
| Subject: | Re: what is wrong with my php code? | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185218@lists.php.net to get a copy of this message | ||
msa wrote:
this has now been added to the top: <?php require_once('Connections/jpike.php'); ?> <?php mysql_select_db($database_jpike, $jpike); $query_rsarchiveTest = "SELECT * FROM ArchiveNews"; $rsarchiveTest = mysql_query($query_rsarchiveTest, $jpike) or die(mysql_error()); $row_rsarchiveTest = mysql_fetch_assoc($rsarchiveTest); $totalRows_rsarchiveTest = mysql_num_rows($rsarchiveTest); ?> and to the bottom: <?php mysql_free_result($rsarchiveTest); ?> I am using Dreamweaver and it writes the code for the connection to the database...You can also write your queries with the db name included.... SELECT * FROM dbName.tableName WHERE..... And you don't have to call mysql_select_db(). -- John C. Nichel KegWorks.com 716.856.9675 john@kegworks.com