Help on this select I need a clause to delete records

Asked

Viewed 22 times

0

Good evening, I need to solve a problem in this consultation

SELECT * FROM campanha WHERE limite > '0' AND tipo = '1' ORDER BY rand() LIMIT 1

I need to do the same query plus deleting all registration with a particular login.. how to proceed?

In this same table has the field 'USER' I need to check if it is the same from Session and show only results without this login

The way it is it returns me all results included with the same person login

  • 1

    What stops you from doing "WHERE usuario <> '" . $_SESSION['usuario'] . "' AND limite > '0' AND tipo = '1'" ?

  • Thank you my I was fighting with it for some time, you know that time that the brain of us Uga and does not go forward! kkkkkk worked! another problem solved here! thx (MY DOUBT IS WHETHER THE TWO 'AND' WORKS! IT WILL TAKE TYPE 1 AND LIMIT ABOVE 0?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.