saw Posted September 2, 2008 Share Posted September 2, 2008 Hello, I hope to find help here. I thank you in advance for your time and assistance. I am a noob I have installed xampp and use dreamweaver to edit mysql and php on my localhost machine. I am attempting to do this tutorial I found on the web. which is just to display the details of a table. http://www.nebulex.com/index.php/tutorials/dreamweaver/mysqlphp/dynamic%20Tables/46? However I am getting an error Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\cats.php on line 25 Line 25 is.. <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> here is the whole code block. <table border="1" cellpadding="5" cellspacing="5"> <tr> <td>id</td> <td>Name</td> <td>Sex</td> <td>DOB</td> <td>Mother</td> <td>Father</td> <td>Coat</td> <td>Color</td> <td>Vocal</td> </tr> <?php do { ?> <tr> <td><?php echo $row_Recordset1['id']; ?></td> <td><?php echo $row_Recordset1['Name']; ?></td> <td><?php echo $row_Recordset1['Sex']; ?></td> <td><?php echo $row_Recordset1['DOB']; ?></td> <td><?php echo $row_Recordset1['Mother']; ?></td> <td><?php echo $row_Recordset1['Father']; ?></td> <td><?php echo $row_Recordset1['Coat']; ?></td> <td><?php echo $row_Recordset1['Color']; ?></td> <td><?php echo $row_Recordset1['Vocal']; ?></td> </tr> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> </table> <?php require_once('Connections/Insert.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_Insert, $Insert); $query_Recordset1 = "SELECT * FROM `index`"; $Recordset1 = mysql_query($query_Recordset1, $Insert) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); mysql_free_result($Recordset1); ?> Thanks again for looking and any assistance you can give Quote Link to comment https://forums.phpfreaks.com/topic/122320-solved-using-dreamweaver-to-display-a-tablewarning-mysql_fetch_assoc-supplied-arg/ Share on other sites More sharing options...
saw Posted September 2, 2008 Author Share Posted September 2, 2008 Figured it out, please delete this post Quote Link to comment https://forums.phpfreaks.com/topic/122320-solved-using-dreamweaver-to-display-a-tablewarning-mysql_fetch_assoc-supplied-arg/#findComment-631733 Share on other sites More sharing options...
kamaldesigner Posted October 25, 2008 Share Posted October 25, 2008 hy friend i like the site that u toked the tutorial from , and please send me other websites links to learn more php with mysql please Quote Link to comment https://forums.phpfreaks.com/topic/122320-solved-using-dreamweaver-to-display-a-tablewarning-mysql_fetch_assoc-supplied-arg/#findComment-674269 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.