Search the Community
Showing results for tags 'mysql query'.
-
Hello We have a database table that confirms the installations started and completed for our game... and I am looking to confirm how many installs start but never complete... So, this is my current query... SELECT description, ip from error_log where description like '%install%' order by ip; description can be either install started or install completed and we use the IP to identify a specific user... How do I query that shows the IP's which have a started but no completed in the description ? Any help would be appreciated Thanks
-
Hi! i have two tables: Table "a" has the following records: | program | Activity | expense | transDate --------------------------------------------------------- 1 | 1 | 2000 | yyyy/mm/dd H:m:s 2 | 3 | 234 | yyyy/mm/dd H:m:s 1 | 1 | 234 | yyyy/mm/dd H:m:s 2 | 3 | 234 | yyyy/mm/dd H:m:s Table "b" has the following records | program | Activity | approved| approveDate --------------------------------------------------------- 1 | 1 | 3000 | yyyy/mm/dd H:m:s 2 | 3 | 5034 | yyyy/mm/dd H:m:s 6 | 1 | 1234 | yyyy/mm/dd H:m:s 4 | 2 | 2304 | yyyy/mm/dd H:m:s what i want to achieve is : Select all records in table "a" and group them so that a group has same "program" and "Activity" number and of the same YEAR THEN sum the expense for each group . the sum found is then subtracted from the Table "b" Approved amount WHERE "Program" and "Activity" in both tables are the same. results: | program | Activity | approved| TotalEpense | Difference | YearOfApprovalAndUse ------------------------------------------------------------------------------------------------------ 1 | 1 | 3000 | 2234 | 766 | yyyy (we indicate the year extracted from the transaction date) 2 | 3 | 5034 | 468 | 4566 | yyyy (we indicate the year extracted from the transaction date) How is it possible through a mysql query? thanks in advance.
-
let me tell you i am new to php and mysql i have mysql database like below UID Student name Date H 433100002 ABC 24-04-13 0.5 433100002 ABC 24-04-13 1 433100002 ABC 24-04-13 0 As you have seen UID,Student name,Date are repeating but the value is H is different , so i want to display the data in the form below UID Student Id Date Hour1 Hour2 Hour3 433100002 ABC 24-04-13 0.5 1 0 Anybody's help appreciated.