Jump to content

not a valid MySQL-Link resource


maxudaskin

Recommended Posts

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/thelyonn/public_html/spilledinkmac/include/functions.php on line 70

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/thelyonn/public_html/spilledinkmac/include/functions.php on line 72

 

 

Any Ideas?

 

function viewpoems($limit){
    $viewpoemsql = "SELECT * FROM entries_literature ORDER BY eid DESC LIMIT 2";
    $viewpoemquery = mysql_query(viewpoemsql,$con);
    echo '<table width="162" border="0" cellspacing="0" cellpadding="0">';
    while($viewpoemresult = mysql_fetch_array($viewpoemquery)){
echo '<tr>';
    echo '<td colspan="2"><div align="center">Title</div></td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td>';
    echo '<div align="left" class="style1">Name</div></td>';
    echo '<td><div align="right" class="style1">Date</div></td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td colspan="2"><div align="center">TEXT</div></td>';
    echo '</tr>';
 }
 echo '</table>';
}

Link to comment
https://forums.phpfreaks.com/topic/75964-not-a-valid-mysql-link-resource/
Share on other sites

few things...

 

$viewpoemquery = mysql_query(viewpoemsql,$con);

 

viewpoemsql is missing it's dollar sign.

 

what is $con?

 

i suggest you use or die (mysql_error()) for more info.

 

$viewpoemquery = mysql_query($viewpoemsql,$con) or die(mysql_error());

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.