Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qcheckboxcolumn example is broken #241

Closed
olegabr opened this issue Apr 25, 2013 · 4 comments
Closed

qcheckboxcolumn example is broken #241

olegabr opened this issue Apr 25, 2013 · 4 comments
Labels
Milestone

Comments

@olegabr
Copy link
Member

olegabr commented Apr 25, 2013

http://examples.qcu.be/assets/_core/php/examples/dynamic/qcheckboxcolumn.php

Exception in PHP Script /assets/_core/php/examples/dynamic/qcheckboxcolumn.php
MySqli Error: 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 '"related_project_assn"
    where 
"child_project_id" = `t0`.`id` 
' at line 15

Query:   Show/Hide

SELECT

    `t0`.`id` AS `a0`,
    `t0`.`project_status_type_id` AS `a1`,
    `t0`.`manager_person_id` AS `a2`,
    `t0`.`name` AS `a3`,
    `t0`.`description` AS `a4`,
    `t0`.`start_date` AS `a5`,
    `t0`.`end_date` AS `a6`,
    `t0`.`budget` AS `a7`,
    `t0`.`spent` AS `a8`,
    ((select 
                            "project_id"
                        from 
                            "related_project_assn"
                        where 
                            "child_project_id" = `t0`.`id` 
                             and "project_id" = 1)) AS `__assn_item`
FROM
    `project` AS `t0`

LIMIT 15
@vaibhav-kaushal
Copy link
Member

Shouldn't this be in the example site's repo?

@olegabr
Copy link
Member Author

olegabr commented May 21, 2013

Looks like it does not likes double quotes in a subquery

@olegabr
Copy link
Member Author

olegabr commented May 25, 2013

"Shouldn't this be in the example site's repo?" I don't think so. first of all, because no one watches events from any repository different from qcubed/framework.

olegabr added a commit to olegabr/qcubed that referenced this issue May 25, 2013
"qcheckboxcolumn example is broken" - double quotes were the cause of the problem.
@kukrik
Copy link
Member

kukrik commented May 25, 2013

Great work from @ olegabr. This revised code example http://localhost:8888/qcubed_2.2.0/assets/_core/php/examples/dynamic/ccheckboxcolumn.php works perfectly. Thanks!

olegabr added a commit that referenced this issue May 26, 2013
@olegabr olegabr closed this as completed May 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants