Jump to content

Find, Replace, Trigger and Grab


laron

Recommended Posts

Just wondering if there is an easy way to do this.

 

I'm trying to find the "true" boolean in a table column (there will only be one), trigger it to false and trigger the next row's same column to true, while grabing that newly triggered column row's id.

 

Example:

 

Table Users

 

id

name

phone

special

1

name1

1234

false

2

name2

1235

false

3

name3

1236

true

4

name4

1237

false

5

name5

1238

false

 

So...

I need to find the row that has has the "special" field set to true, change it to false, change the next row's "special" field to true and get that row's id to store into a variable.

 

If this makes sense, what is the easiest way to do this (after a successful connect to the database).

 

If it doesnt, what more information do you need?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.