laron Posted April 12, 2009 Share Posted April 12, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/153768-find-replace-trigger-and-grab/ Share on other sites More sharing options...
fenway Posted April 14, 2009 Share Posted April 14, 2009 Say what? SQL has no concept of "next". Quote Link to comment https://forums.phpfreaks.com/topic/153768-find-replace-trigger-and-grab/#findComment-810111 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.