I've got a database where every row has a location (California, Canada, something like that. BTW, these are pictures, so there's more than one row with the same location). Basically, I want to run a query that pulls out the location and continuously loads it into two variables (if there is a better way, please comment). If the location is different between the two variables, do this. If not do this.
For example, let's say row 1 and 2 have a location of CA. Row 3 has a location of CND.
Row 1 location loads into $temp, row 2 location loads into $temp2. Then it compares $temp and $temp2. If they're the same, don't do anything. Now load row 3 into $temp. Compare $temp2 and $temp. They're different, so do this.
Can anyone help?