Here is my index.php file where sessioning is done :
Here is my full grid.php file :
kindly help me remove the error sir.
I got it working now but still get this error message:
QLSTATE[HY093]: Invalid parameter number: no parameters were bound
I tried the link u mentioned and also used this http://www.trirand.net/forum/default.aspx?g=posts&m=5425 but i got a page with 0 rows. Though the error disappeared.
Can you please help me out
I tried something like this:
$opt1=” WHERE issues.productid in (’16’,’114′)”;
and it worked correctly with the following dump :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
Executed 2 query(s) - 2015-03-25 11:15:44 Array ( [0] => Array ( [time] => 2015-03-25 11:15:44 [query] => SELECT COUNT(*) AS COUNTR FROM issues INNER JOIN issue_priorities ON issue_priorities.VALUE = issues.PRIORITY - 1 INNER JOIN issue_resolutions ON issue_resolutions.RESID = issues.RESOLUTION INNER JOIN users ON users.ID = issues.ASSIGNEDUSERID INNER JOIN products ON products.PRODUCTID = issues.PRODUCTID INNER JOIN issue_status ON issue_status.STATUSID = issues.STATUS WHERE issues.productid in ('16','114') [data] => [types] => [fields] => [primary] => [input] => ) [1] => Array ( [time] => 2015-03-25 11:15:44 [query] => SELECT CONCAT(issues.type,'0',issues.kbid) as KBID,issues.issuesummary as Summary,products.productname as Product,issue_priorities.description as Priority,date_format(issues.createddate, '%d/%m/%Y') as Reported,date_format(issues.lastupdated, '%d/%m/%Y') as Updated,issue_status.statusdescription as Status,issue_resolutions.resdescription as Resolution,users.logon as Assigned FROM issues INNER JOIN issue_priorities ON issue_priorities.VALUE = issues.PRIORITY - 1 INNER JOIN issue_resolutions ON issue_resolutions.RESID = issues.RESOLUTION INNER JOIN users ON users.ID = issues.ASSIGNEDUSERID INNER JOIN products ON products.PRODUCTID = issues.PRODUCTID INNER JOIN issue_status ON issue_status.STATUSID = issues.STATUS WHERE issues.productid in ('16','114') ORDER BY KBID asc LIMIT 0, 20 [data] => [types] => [fields] => [primary] => [input] => ) ) |
But when i tried making it dynamic like :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
$opt1=" WHERE issues.productid in ".$op1;</blockquote> This is the dump i got: <blockquote>Executed 2 query(s) - 2015-03-25 11:21:11 Array ( [0] => Array ( [time] => 2015-03-25 11:21:11 [query] => SELECT COUNT(*) AS COUNTR FROM issues INNER JOIN issue_priorities ON issue_priorities.VALUE = issues.PRIORITY - 1 INNER JOIN issue_resolutions ON issue_resolutions.RESID = issues.RESOLUTION INNER JOIN users ON users.ID = issues.ASSIGNEDUSERID INNER JOIN products ON products.PRODUCTID = issues.PRODUCTID INNER JOIN issue_status ON issue_status.STATUSID = issues.STATUS WHERE issues.productid in [data] => [types] => [fields] => [primary] => [input] => ) [1] => Array ( [time] => 2015-03-25 11:21:11 [query] => SELECT CONCAT(issues.type,'0',issues.kbid) as KBID,issues.issuesummary as Summary,products.productname as Product,issue_priorities.description as Priority,date_format(issues.createddate, '%d/%m/%Y') as Reported,date_format(issues.lastupdated, '%d/%m/%Y') as Updated,issue_status.statusdescription as Status,issue_resolutions.resdescription as Resolution,users.logon as Assigned FROM issues INNER JOIN issue_priorities ON issue_priorities.VALUE = issues.PRIORITY - 1 INNER JOIN issue_resolutions ON issue_resolutions.RESID = issues.RESOLUTION INNER JOIN users ON users.ID = issues.ASSIGNEDUSERID INNER JOIN products ON products.PRODUCTID = issues.PRODUCTID INNER JOIN issue_status ON issue_status.STATUSID = issues.STATUS WHERE issues.productid in ORDER BY KBID asc LIMIT 0, 20 [data] => [types] => [fields] => [primary] => [input] => ) ) |
I echoed contents of $op1 this is what it gave:
(’16’,’114′)
I echoed $grid->SelectCommand, it gave:
1 2 |
SELECT CONCAT(issues.type,'0',issues.kbid) as KBID,issues.issuesummary as Summary,products.productname as Product,issue_priorities.description as Priority,date_format(issues.createddate, '%d/%m/%Y') as Reported,date_format(issues.lastupdated, '%d/%m/%Y') as Updated,issue_status.statusdescription as Status,issue_resolutions.resdescription as Resolution,users.logon as Assigned FROM issues INNER JOIN issue_priorities ON issue_priorities.VALUE = issues.PRIORITY - 1 INNER JOIN issue_resolutions ON issue_resolutions.RESID = issues.RESOLUTION INNER JOIN users ON users.ID = issues.ASSIGNEDUSERID INNER JOIN products ON products.PRODUCTID = issues.PRODUCTID INNER JOIN issue_status ON issue_status.STATUSID = issues.STATUS WHERE issues.productid in ('16','17','20','114','125') |
Can you please have a look into it?
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top