Results 1 to 2 of 2

Thread: Delete MySql Entry

  1. #1

    Thread Starter
    Frenzied Member Inuyasha1782's Avatar
    Join Date
    May 2005
    Location
    California, USA
    Posts
    1,035

    Delete MySql Entry

    Okay, I'm making a recruit script for my gaming clan site. What it does, is when someone want's to recruit anyone they get a code that's generated and that code is placed into a table so when the member registers they use the code to verify themselves. I have all of it done, but now I need to delete the key so that it can be used again. Here is what I am using:

    Code:
    $query="delete from codes where code = " . $key;
    mysql_query($query);
    I have a table named "codes" and the two parts in it are "id" and "code". $key is the entered key from the registering member.

    So I tested it myself, and even copied a code from the table and it still won't delete. What's wrong?
    Age - 15 ::: Level - Advanced
    If you find my post useful please ::Rate It::


  2. #2
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Re: Delete MySql Entry

    try
    PHP Code:
    $query="delete from codes where code = '" $key "'"
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

Posting Permissions

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



Click Here to Expand Forum to Full Width