Jump to content

adgjm

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

adgjm's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Say I have a single PHP file that includes all those commands. How exactly does that script know what part to execute whether the +1 or -1? Could you show me an example script that shows how the system knows to execute which queries? I know you have lines of PHP to initiate the connection to MySQL, then the next is your query stored into any variable like $line and it executes it when you store it in a variable. How do you make it so that it executes only certain things if you have say 3 different queries like in my case (+1, -1, Random)?
  2. I just need to know the individual statements. This does not need to be done in realtime. I am fine if it refreshes the page after you click on +1 or -1.
  3. It does. I do not know how to make multiple connections to SQL and how to affect tables in the way I mentioned in my first post. Please help.
  4. I have a mysql database table with 4 fields. 1st one is ID, 2nd Name, 3rd is the number 50, 4th is the number 10. I have a single page called "index.php". On this page, there are 4 buttons and one text field. There is a button that says "+1" and another "-1", with the third being "Subtract from 4th Field", and the fourth saying "Random". The textfield is where you input a name. When you click on the +1, it  searches for the name in the text field, and for it's third field using the number 50, it adds 1 to it. When a user clicks on Random, it takes the number in the 4th field (10) and subtracts the 50 by 10. When a user clicks on "Random", it randomly selects either +1, -1, or the number in the 4th field (10) and adds or subtracts depending on what it is. How do I do this?
×
×
  • 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.