Calculate Sql Tabels
Hello,
i hope u can help me. I want to Calculate (+) the inserts of Cell 1 then Save this under result1 Then the inserts of Cell 2 thens save it under result2. Then i want to Count the enterys (see Picture) here it is =2 I don't have any idear how i do this. I tryed everything, but i a noob in this programmin language. http://www.schubinator.de/scriptinghelp/sqlsave1.jpg I hope u know what i mean, hope this image helps !Very importand! The table gets every Day 1-13 inserts more, so the do/while must count all inserts... thats why i ask u 4 help. Here is my Code, Code:
public read(){ |
Re: Calculate Sql Tabels
So your query would be..
Code:
dbi_query(dbc,"SELECT 1,2,SUM(1),SUM(2),COUNT(*) FROM zbktb") |
Re: Calculate Sql Tabels
thank u very mutch, i think i need a little time to understand the small language, i get the result 181, but i try to make the rest alone with ur great and speedy help, thanks again :up:
|
Re: Calculate Sql Tabels
I tryed a lot, i renamed the Tabels because numbers are not good to locate the error.
I tried your idea, its surely right, but i cant use it because i am too noobie. so i post the Completly code for u, maybe u can see how to use ur idea right. in the Documentation, I found a help tut 4 mysql, this works better than my version. But i get crasy with the calculate. Here the Updated Code Code:
public lesen() {http://schubinator.de/scriptinghelp/sqlsave2.jpg Important! Every Server this plugin is installed, will be added to this table, so the server result needs everytime a new count. |
Re: Calculate Sql Tabels
Code:
I havn't compiled or tested it so theres probably heaps of spelling mistakes but I think that's about right |
Re: Calculate Sql Tabels
Wow! i dont know how i can so much thanks
I tried this since 2 weeks (i looked at many other scripts and tried to make they work for me) but it doesn't work, now you give me the right code !exacly! i love u :up: very very very thanks, u are my hero, now i can go on the rest is easy i hope thaaaaanks!!!!! |
Next Problem
Hello again,
i have a big Problem. It works 4 a while, but i don't know why it isn't working now ... The Plugin isn't update the Server right. every time the task execute the command update it makes a new Server entery I wan't to keep one zell per server http://www.schubinator.de/scriptinghelp/dublicate.jpg i hope u can help me again so fine Code:
dbi_query(dbc, "REPLACE INTO zbkcommunity VALUES ('%s', %i, %i)",Server,Spieler,MaximaleSpieler)The ip is not change thats why i use it as "ID" |
Re: Calculate Sql Tabels
Code:
UPDATE zbkcommunity SET Spieler=%i, MaximaleSpieler=%i WHERE Server=^"%s^"",Spieler,MaximaleSpieler,Server) |
Re: Calculate Sql Tabels
Thank you 4 help pRED* | NZ
now i have a new Problem. Moved next Problem to this Thread: http://forums.alliedmods.net/showthread.php?t=55282 because the help tropic now is changed to if entery exist update else insert |
| All times are GMT -4. The time now is 10:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.