Jump to content

Why does php think mysql_fetch_array() is bad?


DiscoTrio

Recommended Posts

I have this working on anather page but as soon as I plug into a table I get the following warning:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/bmvybfbk/public_html/displaytesting.php on line 126

 

Heres the code:

 

<table cellpadding="2" cellspacing="2" width="90%">
<tr>
<td>
<?php
$con = mysql_connect("localhost","bmvybfbk_master","74SAc194G");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("bmvybfbk_website", $con);

$result3 = mysql_query("SELECT LEFT (content, 100) FROM snews WHERE id='1' ORDER BY id2 LIMIT 0, 5;SELECT * FROM snews WHERE id='1' ORDER BY id2 LIMIT 0, 5;");

while($row3 = mysql_fetch_array($result3))
  { 
  echo $row['content'];
  }
?> 
</td>
<td>
2
</td>
</tr>
<tr>
<td>
3
</td>
<td>
4
</td>
</tr>
</table>

K when added inside the query nothing changes, on very end of line I get this:

 

Parse error: syntax error, unexpected T_LOGICAL_OR in /home/bmvybfbk/public_html/displaytesting.php on line 124

 

By the way line 124 is: query line

and 126 is one with while($row3 = mysql_fetch_array($result3))

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.