php mysql greater than issue -
I have two tables: I am trying to inquire from all the users who paid more images than the entries. But it does not work properly .. What does print: You can see that the jaccon @ and ray should not be in the list, because the paid entry is no more than Code here: Get rid of quotation marks first, they are for verbal strings. Second, you can compare the values collected only with the clause: apart from this, instead of the users, pictures . Users have the column
paid how many images they pay to enter this contest, this is a number .. In the images, a column
has been entered There is no value of 0, and 1 for entry. I need the amount of money for each user.
bob@example.com 8 2 jcannon@example.com 3 3 jrcih@example.com 7 3 aerwqeerll @ Example.com 5 1 ray @ example.com 2 3
$ SQL = mysql_query ("SELECT *, SUM (images.entered) users, images WHERE users.id = images.owner and users.paid & SUM (images.entered) 'Group by users.id'); while ($ sendto = mysql_fetch_array ($ SQL)) {print $ sendto ['email']. "". $ Sendto ['Payment'] "". $ Sendto ['SUM (images.entered)'] "& lt; Br> What can I do?
one ?? | WHERE รข ?? | Users have paid & gt; = SUM (images.entered)
WHERE To make use of the syntax, I make it very clear:
Include images from
SELECT *, SUM (images.entered) users at IN.ER users.id = images.owner GROUP by users.id to users.paid> SUM (images.entered)
Comments
Post a Comment