Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Post the line.
  2. I typically like to create a pure String for the query, that way you can echo exactly what you're passing in: $query = "DELETE FROM users WHERE id='$user_id'"; $return = mysql_query($query) or die(mysql_error()); I would also take a look at this article to learn how to handle mysql exceptions properly: http://www.phpfreaks.com/blog/or-die-must-die
  3. Please give adequate time for people to answer your question. I believe what is happening is that since you're calling mysql_query twice, the second call is trying to execute a query on a resource id (1). $result = mysql_query("DELETE FROM users WHERE id='$user_id'"); Now $result is the resource id, which in your particular error message is 1. You're calling mysql_query() again on $result, passing in 1: $return = mysql_query($result) or die(mysql_error()); which is an invalid query.
  4. Is there something wrong with premiso's suggestions? Have you even tried any of them? Like he said, the ideal way is to export/import the relevant DB tables.
  5. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=339095.0
  6. Sorry I misunderstood your question. You would have to use MySQL variables like this: http://stackoverflow.com/questions/1416854/how-to-find-out-the-rank-of-a-row-based-on-a-mysql-sum
  7. Unless you have it in your DB, just use PHP. Have a variable $i before the while and increment it by 1 every loop.
  8. I'd suggest creating a new thread with your code and the specific issue you're experiencing.
  9. Look at the first example, it shows you.
  10. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=339066.0
  11. Sure, just adjust the HTML in your echo by following this tutorial: http://www.quackit.com/html/html_table_tutorial.cfm
  12. http://api.jquery.com/jQuery.post/ The last example is exactly what you want:
  13. I fixed the link in your original post, you had one too many http's. Also, the CSS doesn't seem to be loading on your site.
  14. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=339040.0
  15. Do they need to be shucked?
  16. I would bet there's a better place to implement this error checking. Probably when you are trying to generate the array you can check and handle it properly.
  17. How is '$rs_frd' being generated?
  18. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=338784.0
  19. There may be a better way but, selecting records for the month of November: SELECT blah FROM table WHERE MONTH(date_field) = 11 Sounds like you might want to add a condition in for the year too.
  20. I'll assume your error has something to do with this, since you didn't post it: http://www.phpfreaks.com/forums/index.php?topic=37442.0
  21. Post your table definitions, what you want to extract & join on. We can help you with your syntax & logic. Have a look at this first - http://dev.mysql.com/doc/refman/5.0/en/join.html
  22. You need to join the other table. What's the actual problem?
  23. In fact, you shouldn't be using it in any of these lines: $Recordset1 = mysql_query($smart, $Users) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($smart); $totalRows_Recordset1 = mysql_num_rows($smart);
  24. i've closed off the other post so i'm just relying on this one now thanks In the future, post where you think it most belongs, if your question mutates or just simply doesn't belong there, it can be moved. Double posting will ultimately waste peoples' time.
×
×
  • 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.