0
while($dustData = mysql_fetch_row($dustLog))
{
    for($i = 0; $i < count($dustData); $i++)
    {
        $dustRow = ";".$dustData[$i];
        echo $dustRow;
    }
}

I'm using this to return each row to .responseText in my main file. I'm trying to transfer a table from the database into a <table>.

I'm getting this in my javascript console saying

["<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000", " color: #fce94f", " font-size: x-large", "'>( ! )</span> Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in C:\wamp\www\Final\loglog.php on line <i>6</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0005</td><td bgcolor='#eeeeec' align='right'>673672</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='C:\wamp\www\Final\loglog.php' bgcolor='#eeeeec'>..\loglog.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0117</td><td bgcolor='#eeeeec' align='right'>680760</td><td bgcolor='#eeeeec'><a href='http://www.php.net/mysql_fetch_row' target='_new'>mysql_fetch_row</a>
(  )</td><td title='C:\wamp\www\Final\loglog.php' bgcolor='#eeeeec'>..\loglog.php<b>:</b>6</td></tr>
</table></font>
"]

I have no idea what that message means. Any ideas?

2
  • 7
    This means that your mysql_query() returned false, so the SQL query failed to execute. Commented Jun 3, 2012 at 21:25
  • That's why you'll often find mysql_query($query) or die() constructs, specifically to deal with this false return value. Commented Jun 3, 2012 at 21:32

1 Answer 1

3

Hidden in that mass of text is the following:

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given

Which means your query failed (returned false). Otherwise, that should work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.