Jump to content
Larry Ullman's Book Forums

jwmag

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by jwmag

  1. In my original post, I said I was using an exact copy of the code in the book, but I just realized this was not true! The code in the book is 100% correct, as expected. My apologies to the author.
  2. That was it. You know, I didn't even think of looking at the php manual.... Thanks for the fix and tip, margaux!
  3. This error keeps occuring: Warning: mysql_fetch_array() expects parameter 2 to be long, resource given in /home/content/83/9391183/html/delete_quote.php on line 25. A portion of the code (from chapter 13): if ( isset($_GET['id']) && is_numeric($_GET['id']) && ($_GET['id'] > 0 ) ) { $query = "SELECT quote, source, favorite FROM quotes WHERE quote_id={$_GET['id']} LIMIT 1"; if ( $r = mysql_query($query, $dbc) ) { $row = mysql_fetch_array($r, $dbc); <<<<<<<<<<< LINE 25 I don't know what else to add that might be useful. No problems with adding or deleting from the database's table, nor with listing all of the entries from a table. This error seems to occur only when trying to 'SELECT' a specific row in the table and then print it to the web browser. I've tried different web browsers. No luck. I'm using an exact copy of the code that is in the book (EDIT: this is not true. i added a parameter in line 25 w/o realizing it, even after double checking that my code matched the books. the book's code is 100% error free. sorry about that.) That leads me to think it might be a configuration issue, but I don't know. I'm using a webserver and mysql database thru godaddy.com. I had this same exact error (mysql_fetch_array() expects parameter 2 to be long) when working with the examples in chapter 12. Please help. Any help is greatly appreciated! Thanks in advance.
×
×
  • Create New...