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>

Link to comment
Share on other sites

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))

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.