SQL errors
- Status
- Closed
- Subject
- SQL errors
- Version
- 1.9.x
- Category
- Error
- Feature
- Calendar
Database independence (Non-Mysql, ADOdb Postgres, Oracle, etc) - Resolution status
- Out of Date
- Submitted by
- maxpower
- Lastmod by
- Kissaki
- Rating
- Description
Several SQL queries only work with mysql because it is not SQL92 compliant. Some bugs are already fixed now but at least the case sensitivity bug is still there.
If you create a table with columns and later use a query you have to use the exact name and not a name with different cases, an example is:
Warning: postgres7 error: ERROR: column i.categoryID does not exist in query:
select i."calitemId" as "calitemId", i."name" as "name", i."description" as "description", i."start" as "start", i."end" as "end", i."url" as "ur l", i."status" as "status", i."priority" as "priority", c."name" as "calname", i."calendarId" as "calendarId", i."locationId" as "locationID", i."categoryID" as "categoryID", i."nlId" as "nlId" from "tiki_calendar_items" as i left join "tiki_calendars" as c on i."calendarId"=c."calendarId" where i."calendarId"=?) and ((i."start" > ? and i."end" < ?) or (i."start" < ? and i."end" > ? and c."personal"='y' and i."user"=?) or c."personal" != 'y' order by "start" asc
in /usr/share/tikiwiki/lib/tikidblib.php on line 134this is because the column is named categoryId and not categoryID.
I think in this example i manually fixed on my side another Id that is locationId where the query used locationID which is not existent.This not only occurs in the calender section but this is just the sections that i remember where the error occurs.
- Solution
check all column names and compare them with the sql queries. fix the case problem.
Or probably on mysql enable ANSI mode to get error checking there aswell.
Please upgrade to a recent version of tiki.
If problem persists, add a new tracker item please.- Importance
- 5
- Priority
- 25
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 967
- Created
- Friday 05 January, 2007 17:33:57 UTC
by Unknown - LastModif
- Saturday 08 August, 2009 19:38:06 UTC