Announcement

Collapse
No announcement yet.

Unknown column 'I' in 'where clause'

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unknown column 'I' in 'where clause'

    ------------------------------------------------------------------------------------------------------
    I am trying to do a summation (totals) on a column feescollected. I am getting an error listed below:
    Error
    Error while accessing the database:
    Unknown column 'I' in 'where clause'
    select count(*), sum(FeesPaid) as sum_feespaid from feescollected where Student = 4 and TermPaidFor = I

    Script: C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\app\Testprojec t\grid_feescollected\grid_feescollected_total.clas s.php (127)

    the correct sql querry should have "I" at termPaidFor = "I" instead of TermPaidFor = I
    Though i've seen a similar problem on this forum, i dont know where to make the correction in the sql while in scriptcase
    Can somebody help out?

  • #2
    Hello,

    Go into your application and enable debug mode (Application> Settings> Debug Mode - Yes)

    If you can see where the error and correct it will be great.

    After that send me a picture of the problem so that I can analyze.

    Thank you!
    Best regards,
    Thomas Soares.
    ScriptCase International.

    Email: t.soares@scriptcase.net
    Visit our Blog: http://www.scriptcase.net/blog/
    Visit out fan page: http://www.facebook.com/Scriptcase

    Comment


    • #3
      Originally posted by Thomas Soares View Post
      Hello,

      Go into your application and enable debug mode (Application> Settings> Debug Mode - Yes)

      If you can see where the error and correct it will be great.

      After that send me a picture of the problem so that I can analyze.

      Thank you!
      I've emailed you. The same details as in emails are below:

      (pdo-mysql): select count(*), sum(FeesPaid) as sum_feespaid from feescollected (pdo-mysql): SELECT FeesCollectedID, Student, PaymentModID, Ref, FeesPaid, DatePaid, TermPaidFor from feescollected order by Student asc, TermPaidFor asc LIMIT 0,12 (pdo-mysql): select count(*), sum(FeesPaid) as sum_feespaid from feescollected where Student = 4 (pdo-mysql): SELECT concat(Surname, " , ", Others) FROM students where StudentsID = 4 order by Surname, Others (pdo-mysql): select count(*), sum(FeesPaid) as sum_feespaid from feescollected where Student = 4 and TermPaidFor = I 1054: Unknown column 'I' in 'where clause'

      ADOConnection._Execute(select count(*), sum(FeesPaid) as sum_feespaid from feescollected where Student = 4 and TermPaidFor = I, false) % line 1085, file: adodb.inc.php
      ADOConnection.Execute(select count(*), sum(FeesPaid) as sum_feespaid from feescollected where Student = 4 and TermPaidFor = I) % line 125, file: grid_feescollected_total.class.php
      grid_feescollected_total.quebra_termpaidfor_Studen t_Term(4, I, = 4, = I) % line 2486, file: grid_feescollected_grid.class.php
      grid_feescollected_grid.quebra_termpaidfor_Student _Term(4, I) % line 715, file: grid_feescollected_grid.class.php
      grid_feescollected_grid.inicializa() % line 104, file: grid_feescollected_grid.class.php

      Error
      Error while accessing the database:
      Unknown column 'I' in 'where clause'
      select count(*), sum(FeesPaid) as sum_feespaid from feescollected where Student = 4 and TermPaidFor = I

      Script: C:\Program Files (x86)\NetMake\v8\wwwroot\scriptcase\app\Testprojec t\grid_feescollected\grid_feescollected_total.clas s.php (127)

      Comment


      • #4
        I suggest you view the source code from grid_feescollected_total.class.php around line 127 and paste that here as well (a few lines before it as well).

        Comment

        Working...
        X