Query was working in MYSQL but not MYSQLI -


my query working in mysql not in mysqli.

i'm selecting students have done pre , post test.

 select    studid username,    prepoints 'fitness assessment points grade',    end 'end-of-line indicator'      fittest, points     year(submitted) = '2017'    , semester = 'summer2'   group studid  having    (max(prepost = 'pre' ) + max(prepost = 'post')) = 2 , count(distinct prepost) = 2 

any ideas changes need made working again?

here sample data:

 create table `fittest` (   `id` int(11) not null,   `submitted`  datetime default null,   `studid` varchar(100) default null,    `semester` varchar(50) default null,   `instructor` varchar(30)  default null,   `course` enum('phed 1164') default null,   `section`  enum('5001','5003','5005','5007','5009','5011','5013','5015','5017','5019','5021','5023','5025','5027','5029','5031','5033','5035','5037','5039','5041','5043','5045','5047','5049','5051','5053','5055','5057','5059','5061','5063','5065','5067','5069')  default null,   `age` varchar(50) default null,   `gender`  enum('m','f') default null,   `ethnicity` enum('hispanic','african  american','asian','white-non hispanic','other') default null,    `height` char(4) default null,   `weight` int(3) default null,    `flexibility` int(2) default null,   `crunches` int(3) default null,    `pushups` int(3) default null,   `treadtimemin` int(2) default null,    `treadtimesec` int(2) not null,   `treadhr` int(3) default null,    `prepost` enum('pre','post') not null,   `end` char(1) not null  default '#' ) engine=myisam default charset=utf8;   insert `fittest` (`id`, `submitted`, `studid`, `semester`,  `instructor`, `course`, `section`, `age`, `gender`, `ethnicity`,  `height`, `weight`, `flexibility`, `crunches`, `pushups`,  `treadtimemin`, `treadtimesec`, `treadhr`, `prepost`, `end`) values  (17, '2017-01-02 21:55:33', 'slacker', 'spring', 'tim', 'phed 1164',  '5001', '32', 'm', null, '69.5', 155, null, 29, 34, 22, 15, 76, 'pre',  '#'), (16, '2017-01-02 21:31:34', 'bfun', 'spring', 'tim', 'phed  1164', '5001', '32', 'm', null, '69.5', 122, null, 37, 36, 18, 14, 76,  'post', '#'), (15, '2017-01-02 21:31:09', 'bfun', 'spring', 'tim',  'phed 1164', '5001', '32', 'm', null, '69.5', 129, null, 21, 20, 23,  14, 76, 'pre', '#'), 

i figured out issue isn't query. input. input had post prepost value there no results showing. help.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -