Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. You can use - http://us.php.net/simplexml - to grab the child nodes, and loop through them to formulate the table.
  2. May I ask why you even want to do this?
  3. You also may want to change this to: else { $meal = 'Muppet'; }
  4. Maq

    Deleting stuff

    Did you look at the link I sent you? It shows you exactly how to do it. Does your query throw and error? What happens? Can you post the current query you have?
  5. Maq

    Deleting stuff

    What are you having trouble with specifically?
  6. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=318433.0
  7. Maq

    Deleting stuff

    Have a look in the manual, Multiple-table syntax: http://dev.mysql.com/doc/refman/5.0/en/delete.html
  8. Not sure what's more expensive LIKE or REGEXP but I would assume REGEXP. Why can't you use LIKE for each column? Also, I don't think you need to separate your logic with parentheses if all your logical operators are ORs.
  9. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=318398.0
  10. Maq

    I need help

    He must be full.
  11. Sorry, I took this as you wanted the same data in two separate tables.
  12. It's bad practice to store the same data in two separate tables, it defeats the purpose of certain design principles. Do you have to do this within 1 query?
  13. I don't get the logic of this for loop... But w/e. for($count = 0; $stop == true; $count++) This is always true. if($hit = true) Have you echoed out to see where the code stops?
  14. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=318312.0
  15. $stop is false, so your for won't start. $stop = false; for($count = 0; $stop == true; $count++)
  16. Please use tags. Fatal error maybe. Add these two lines directly after your opening PHP tag:
  17. No more food for you.
  18. That code is riddled with fatal errors, lacks formatting, and doesn't make any sense to me.
  19. I had to reformat your date because the strtotime function didn't pick up the format. Might have to play around with it: ini_set ("display_errors", "1"); error_reporting(E_ALL); $table = "your_table"; $post_a = "val1"; $post_b = "val2"; $post_c = "val3"; $post_d = "val4"; $post_e = "12/10/2010"; $post_f = "12/15/2010"; while (strtotime($post_e) { $sql="insert into $table (a, b, c, d, date) values ('$post_a', '$post_b', '$post_c', '$post_d', '$post_e') "; echo "$sql\n "; $post_e = date("m/d/Y", strtotime("+1 day", strtotime($post_e))); } ?>
  20. You may have meant to use backtics to escape the table name in case it's a reserved word. But you should avoid naming tables after reserved words anyway.
  21. What part are you having trouble with? (You posted in PHP Math Help, would you like me to move it?)
  22. Add this temporarily to see if your query is failing for some reason: $info = mysql_query($infoquery) or die(mysql_error()); For a live environment you should be handling these errors more appropriately.
  23. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318277.0
  24. Maq

    I need help

    Yep, and that's exactly where it's going.
  25. Maq

    I need help

    Is there a purpose to this thread?
×
×
  • 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.