Jump to content

shaddf

Members
  • Content Count

    102
  • Joined

  • Last visited

Community Reputation

0 Neutral

About shaddf

  • Rank
    Advanced Member
  1. <div class="fix single_feature_right_add"> <div class="fix single_cat"> <img src="http://lorempixel.com/160/140" alt=""/> <div class="fix single_cat_meta"> <a>This is title from video</a> <div class="fix"> <p class="fleft">3 days ago</p> <p class="fright">7854 views</p> </div> </div> <div class="fix single_cat_rating"> <span>Ratings</span> <div class="single_cat_star"> <a href="">
  2. why not can you explain more please?
  3. Iam using prepared statements to do this. And when i prepare that answer of yours ,it does not work
  4. i have this table: MatchID | PlayerID | Goals -------------------------- 2 1 4 2 3 3 2 13 0 2 9 0 2 5 0 iam trying to get total using dynamic sql query like so: DECLARE TotalVariable INT; SET @l_sql_total=CONCAT(' SELECT SUM(x.Goals) into ',TotalVariable,' FROM a'); but iam getting an error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 And when I change to this: SET @l
  5. they are already grouped by player_id.And when I try your idea it gives this: +-----------+----------+---------+ | player_id | PaddingR | marginR | +-----------+----------+---------+ | 1 | 100 | 0 | | 3 | 100 | 0 | +-----------+----------+---------+ 2 rows in set (0.09 sec) with no correct calculation. i expect to be getting this: +-----------+----------+---------+ | player_id | PaddingR | marginR | +-----------+----------+---------+ | 1 | 57 | 43 | | 3 | 43 | 57 | +-----------+----------+---------+ 2 rows i
  6. why is it that when i try this : SELECT player_id,round(Goals *100/sum(Goals)) as PaddingR,100-round(Goals*100/sum(Goals)) as marginR from table it returns only one row and yet i see two in the table above
  7. i have this table: +-----------+-------+-------------------------+---------------------+ | player_id | Goals | gme | nem | +-----------+-------+-------------------------+---------------------+ | 1 | 4 | CRYSTAL SA Vs Sebowa FC | Sam Lukoye | | 3 | 3 | CRYSTAL SA Vs Sebowa FC | Mulan Babu | | 13 | 0 | CRYSTAL SA Vs Sebowa FC | Doughlas Doughlas | | 9 | 0 | CRYSTAL SA Vs Sebowa FC | Owori Clinton | | 5 | 0 | CRYSTAL SA Vs Sebowa FC | Zimbe Zimbe | | 16 | 0
  8. Ok then Also +---------+---------------+----------+------+-------------------------------+----------+---------------+-----------------------+ | MatchID | CompetitionID | SeasonID | Yr | Achievement | SeasonID | CompetitionID | CompetitionName | +---------+---------------+----------+------+-------------------------------+----------+---------------+-----------------------+ | 27 | 8 | 12 | 2016 | GO BACK TO SCHOOL Cup Winners | 12 | 8 | GO BACK TO SCHOOL Cup | | 29 | 8 | 12 | 2016 | GO BACK TO SCHOOL Cup
  9. Also +---------+---------------+----------+------+-------------------------------+----------+---------------+-----------------------+ | MatchID | CompetitionID | SeasonID | Yr | Achievement | SeasonID | CompetitionID | CompetitionName | +---------+---------------+----------+------+-------------------------------+----------+---------------+-----------------------+ | 27 | 8 | 12 | 2016 | GO BACK TO SCHOOL Cup Winners | 12 | 8 | GO BACK TO SCHOOL Cup | | 29 | 8 | 12 | 2016 | GO BACK TO SCHOOL Cup Winners |
  10. +---------+---------------+----------+------+-------------------------------+----------+---------------+-----------------------+ | MatchID | CompetitionID | SeasonID | Yr | Achievement | SeasonID | CompetitionID | CompetitionName | +---------+---------------+----------+------+-------------------------------+----------+---------------+-----------------------+ | 27 | 8 | 12 | 2016 | GO BACK TO SCHOOL Cup Winners | 12 | 8 | GO BACK TO SCHOOL Cup | | 28 | 10 | 12 | 2016 | Kyanja U-14 Cup Winners |
  11. i have this table A +---------+---------------+----------+ | MatchID | CompetitionID | SeasonID | +---------+---------------+----------+ | 27 | 8 | 12 | | 28 | 10 | 12 | +---------+---------------+----------+ 2 rows in set (0.00 sec) and this table B +------+-------------------------------+----------+---------------+------------------------+ | Yr | Achievement | SeasonID | CompetitionID | CompetitionName | +------+-------------------------------+----------+---------------+------------------------+ | 2016 | GO BACK TO
  12. i have this table: +-----------+-----------+------+------------+-----------------------+-------+ | HomeScore | AwayScore | g_id | mo_th | g_date | venue | +-----------+-----------+------+------------+-----------------------+-------+ | 0 | 0 | 27 | July 2017 | Thu 13th of Jul 04.00 | H | | 0 | 0 | 26 | July 2017 | Sun 9th of Jul 04.00 | A | | 1 | 0 | 23 | June 2017 | Sun 18th of Jun 04.30 | H | | 1 | 1 | 19 | June 2017 | Sun 4th of Jun 04.30 | A | | 0 | 1 | 17 |
  13. i expect condition 3 call sp_get_ourclubresults_details('6','12','2','7','H'); to produce this +-----------+-----------+------+-----------+------------+------------+---------------+-------+ | HomeScore | AwayScore | g_id | mo_th | h_name | a_name | CompetitionID | venue | +-----------+-----------+------+-----------+------------+------------+---------------+-------+ | 1 | 1 | 11 | May 2017 | Sebfwa FC | PARK YARD | 7 | H | +-----------+-----------+------+-----------+------------+------------+---------------+-------+
  14. Ihave this sql: CREATE PROCEDURE sp_get_ourclubresults_details(IN inteamId INT,IN inseasonId INT,IN incategoryId int,IN inCompId INT,IN inVenueId varchar(1)) READS SQL DATA BEGIN IF NOT ISNULL(inCompId) THEN select * from tbl_matches where (HomeTeamID=inteamId OR AwayTeamID=inteamId) and mDate<=date(now()) and LeagueSeasonID = inseasonId and Team_catId=incategoryId and SeasonID = inseasonId and CompetitionID = inCompId order by mDate desc; ELSEIF NOT ISNULL(inVenueId) THEN select * from tbl_matches where (HomeTeamID=inteamId
  15. thanks for you advice but i googled and got a php solution: $length=array(); for($j=0;$j<count($obj->mPlayerstatistics);$j++){ $arr_lge1=array(); $arr_lge1=explode(',',$obj->mPlayerstatistics[$j]['lge']); $length[$j]=count($arr_lge1); }$value = max($length);$key = array_search($value, $length);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.