mysql_query whats wrong??
hia i am trying to create a small box in one of my colum to display the latest article but i keep getting an error saying :
"Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource "
the code is below, what am i doing wrong?
<?php
include("library/config.php");
include("library/opendb.php");
$result = mysql_query('SELECT * FROM colum_articles', $link);
if (!$result) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
while ($row = mysql_fetch_assoc($result)) {
echo $row['a_title'];
}
mysql_free_result($result);
?>
mullet posted this at 18:08 — 24th May 2006.
He has: 31 posts
Joined: Jan 2004
no matter found it.... wrong version of php....
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.