now try:Code:select sum(111) = 111
any you get some looks like randome numbers.Code:select sum(111) from xtable select sum(111) from ytable
Any explanation ?

now try:Code:select sum(111) = 111
any you get some looks like randome numbers.Code:select sum(111) from xtable select sum(111) from ytable
Any explanation ?
Last edited by BubikolRamios; 03022013 at 05:58 PM.
Found a flower or bug and don't know what it is ?
agrozoo.net galery
if you don't spot search button at once, there is search form:
agrozoo.net galery search
what is xtable ?
There are 10 types of people on CodingForums,
Those who understand Binary and those who dont.
Get Cloud Hosting now from only£59 / month
it is any table.
Found a flower or bug and don't know what it is ?
agrozoo.net galery
if you don't spot search button at once, there is search form:
agrozoo.net galery search
its the number of entrys 3 times eg if you have 51 rows it will output 515151
There are 10 types of people on CodingForums,
Those who understand Binary and those who dont.
Get Cloud Hosting now from only£59 / month
or not, 4 rows = 444
31 rows = 3441
so its 111 * rows
There are 10 types of people on CodingForums,
Those who understand Binary and those who dont.
Get Cloud Hosting now from only£59 / month
Correct. 55 rows would be 5661.
It's easy to see this, Bubikol, if you doWhat you are telling SQL (any SQL, not just MySQL) to do is to add 111 to the sum for each row in the table.Code:SELECT COUNT(*), SUM(111) FROM xtable
Think about it: If you do
all that tells SQL to do is to add the value of field someField to the sum for each row in the table. So when you use a constant, instead, it is the constant that gets added for each row.Code:SELECT SUM(someField) FROM xtable
Nothing "random" about it.
Be yourself. No one else is as qualified.