...

View Full Version : script help



php13045
07-15-2008, 06:21 AM
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

abduraooft
07-15-2008, 08:06 AM
Use mysql update (http://dev.mysql.com/doc/refman/5.0/en/update.html) instead of a delete.

php13045
07-15-2008, 12:53 PM
at the moment i am basic php so im not sure i could get something like that going

WyrmFyre
07-15-2008, 01:23 PM
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



$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.

php13045
07-15-2008, 01:25 PM
you can see the script HERE (http://tinyurl.com/5l3azp)

the script was put together using open source scripts

rafiki
07-15-2008, 06:29 PM
Thats not the script thats the output.

php13045
07-15-2008, 10:58 PM
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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum