Hi,

I am trying to set up a section on a site where the results that are shown come from a table.

I want to get the number of the 'current_round' then subtract 1 from it and use that value.

I have looked up MySQL dev site, and assume that I should be using the `-` symbol. but my query isn't working, it jsut keeps displaying the 'current_round' and not the row thats 'current_round'-1.
EG. if the current round is 10, then I want to display round 9.

Here is my query:

"SELECT * FROM rounds WHERE `round`<=>`current_round`-1";

Do you know what I am doing wrong?


Thanks for your help.

Cheers,

QWaz

SELECT * FROM rounds WHERE `round`=`current_round`-1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.