Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: script help

  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    script help

    i have a php standings script i am editing to use for a online league

    however i need to add an option to delete teams the way it is now you can rename a team but cannot delete a team

    is there somewhere that can show how to do this?

    the script uses 1 mysql database

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Use mysql update instead of a delete.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    at the moment i am basic php so im not sure i could get something like that going

  • #4
    New Coder
    Join Date
    Jun 2008
    Posts
    67
    Thanks
    3
    Thanked 13 Times in 13 Posts
    Quote Originally Posted by php13045 View Post
    at the moment i am basic php so im not sure i could get something like that going
    Sounds to me like your using someone elses code, and trying to learn from it. No shame in that! To make it easier for us to provide specific help though, we could do with a few more details, more specifically, the code from which you are working from.

    I think that what abdura is getting at is setting up a query like so

    PHP Code:
    $q mysql_query("UPDATE teams SET deleted=1 WHERE id=".$id); 
    This way, no data is actually truly deleted, but you have a "flag" to show which teams are deleted and which are not.

  • Users who have thanked WyrmFyre for this post:

    php13045 (07-15-2008)

  • #5
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    you can see the script HERE

    the script was put together using open source scripts

  • #6
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,043
    Thanks
    19
    Thanked 42 Times in 42 Posts
    Thats not the script thats the output.

  • #7
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts
    it would seem there would be some sort of open source code that i can get that will allow me to use a php form of some kind to delete teams from the database?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •