dotProject Forums
Google
 

Go Back   dotProject Forums > USAGE, TIPS AND HINTS > General Questions
Register FAQTop Posters Members List Calendar Search Today's Posts Resend Activation Email Mark Forums Read
dotProject Documentation dotProject FAQ Bugs & Feature Requests Language Packs & Themes Download dotProject

General Questions Use this forum to ask questions or provide suggestions about general usage and how to's within the core dotProject modules. These modules include: Calendar, Tasks and Projects, Files, Contacts, Permissions, Forums, User Administration, System Administration etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 25-08-08, 08:49 PM
vsabio vsabio is offline
Junior Member
Return Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 20-08-08
Posts: 6
Default SQL Syntax Error

I just installed dotProject a few days ago. We are in the process of configuring it, and one of my users reported the error shown below -- which is ostensibly repeatable. Any ideas on this?

- V

+++++++++++++++
I created a test project called "Widget RFP" for the company "Test Vendor",
and then added a task "Read RFP". Everything worked fine. I then edited the
task and changed the 'Access' to 'Privileged'. When I saved the change, I
got the error below. I also get the error wherever that task is supposed to
be listed on a screen. I was able to delete the task and recreate it, which
eliminated the problem. However, if I change the 'Access', the error comes
back.


ERROR:
/local/apache2/sites/ra/dotproject/classes/query.class.p
hp(623): query failed(SELECT COUNT(ut.*) AS user_task_count FROM (
`user_tasks` as ut ) WHERE ut.user_id = 5 AND ut.task_id = 6) - error was:
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 '*) AS
user_task_count FROM ( `user_tasks` as ut ) WHERE ut.user_id = 5 AND ut.ta'
at line 1
Backtrace:
0
/local/apache2/sites/ra/dotproject/classes/query.class.p
hp:623
dprint('/local/apache2/sites/ra/dotproject/classes/query
.class.php',623,0,'query failed(SELECT COUNT(ut.*) AS user_task_count FROM (
`user_tasks` as ut ) WHERE ut.user_id = 5 AND ut.task_id = 6) - error was:
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 \'*) AS
user_task_count FROM ( `user_tasks` as ut ) WHERE ut.user_id = 5 AND ut.ta\'
at line 1')
1
/local/apache2/sites/ra/dotproject/classes/query.class.p
hp:775 exec(1)
2
/local/apache2/sites/ra/dotproject/modules/tasks/tasks.c
lass.php:1307 loadResult()
3
/local/apache2/sites/ra/dotproject/modules/tasks/tasks.c
lass.php:2282 canAccess('5')
4
/local/apache2/sites/ra/dotproject/modules/tasks/tasks.p
hp:640 showtask(array (
0 => '6',
'task_id' => '6',
1 => '6',
'task_parent' => '6',
2 => 'Read RFP',
'task_name' => 'Read RFP',
3 => '2008-08-24 15:00:00',
'task_start_date' => '2008-08-24 15:00:00',
4 => '2008-09-01 14:00:00',
'task_end_date' => '2008-09-01 14:00:00',
5 => '0',
'task_dynamic' => '0',
6 => NULL,
'task_pinned' => NULL,
7 => NULL,
'pin_user' => NULL,
8 => '0',
'task_priority' => '0',
9 => '0',
'task_percent_complete' => '0',
10 => '5',
'task_duration' => '5',
11 => '24',
'task_duration_type' => '24',
12 => '2',
'task_project' => '2',
13 => '',
'task_description' => '',
14 => '5',
'task_owner' => '5',
15 => '0',
'task_status' => '0',
16 => 'jdarling',
'user_username' => 'jdarling',
17 => '5',
'user_id' => '5',
18 => '0',
'task_milestone' => '0',
19 => 'tuser',
'assignee_username' => 'tuser',
20 => '1',
'assignee_count' => '1',
21 => 'John',
'contact_first_name' => 'John',
22 => 'Darling',
'contact_last_name' => 'Darling',
23 => '0',
'file_count' => '0',
24 => '0',
'task_log_problem' => '0',
'task_assigned_users' =>
array (
0 =>
array (
0 => '6',
'user_id' => '6',
1 => 'tuser',
'user_username' => 'tuser',
2 => 'dotProject.test@jfd.biz',
'contact_email' => 'dotProject.test@jfd.biz',
3 => '100',
'perc_assignment' => '100',
4 => '100',
'assign_extent' => '100',
5 => 'Test',
'contact_first_name' => 'Test',
6 => 'User',
'contact_last_name' => 'User',
),
),
),0,true,false,true)
5
/local/apache2/sites/ra/dotproject/modules/tasks/index.p
hp:122
include('/local/apache2/sites/ra/dotproject/modules/task
s/tasks.php')
6 /local/apache2/sites/ra/dotproject/index.php:299
require('/local/apache2/sites/ra/dotproject/modules/task
s/index.php')
<\pre>

Fatal error: Call to a member function ErrorMsg() on a non-object in
/local/apache2/sites/ra/dotproject/classes/query.class.p
hp on line 776

Reply With Quote
  #2  
Old 26-08-08, 10:53 AM
ajdonnison's Avatar
ajdonnison ajdonnison is offline
Administrator
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 13-04-04
Posts: 2,108
Default Re: SQL Syntax Error

I believe this is fixed in the nightly snapshot.
__________________

http://www.saki.com.au/ - The driving force behind dotProject
Latest dotProject Release: 2.1.2 Download now
Nightly Stable 2 Snapshot
Reply With Quote
  #3  
Old 26-08-08, 02:25 PM
vsabio vsabio is offline
Junior Member
Return Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 20-08-08
Posts: 6
Default Re: SQL Syntax Error

Quote:
Originally Posted by ajdonnison View Post
I believe this is fixed in the nightly snapshot.
Cool. Where can I get it? When I clicked on the "Nightly Stable 2 Snapshot" link in your .sig, the tarball that I got has a changelog whose most recent entry is:
r5789 | ajdonnison | 2008-07-29 20:24:02 +1000 (Tue, 29 Jul 2008) | 2 lines
#2465 - Patch from phpgus to fix problems with HTML special chars in custom fields.
The file name was "dotproject-stable_2.tar.bz2.tar," which doesn't tell me much about the specific version number. Where can I find the snapshot version in the tarball?

Muchas gracias....

- Vince

Reply With Quote
  #4  
Old 29-08-08, 01:28 PM
vsabio vsabio is offline
Junior Member
Return Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 20-08-08
Posts: 6
Default Re: SQL Syntax Error

Quote:
Originally Posted by ajdonnison View Post
I believe this is fixed in the nightly snapshot.
The snapshot throws a very repeatable error whenever I try to update a task's progress:
Fatal error: Call to undefined method DBQuery::addReplace() in /local/apache2/sites/ra/recapitalizeamerica/dotproject/modules/tasks/tasks.class.php on line 1647
The sequence of steps to generate that error:

Tasks (from top nav) -> edit task (i.e., click the pencil) -> change progress percentage -> Save

Is there a new snapshot that fixes this? :-)

Thanks,
Vince

Reply With Quote
  #5  
Old 08-09-08, 08:21 PM
ajdonnison's Avatar
ajdonnison ajdonnison is offline
Administrator
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 13-04-04
Posts: 2,108
Default Re: SQL Syntax Error

Sounds like you have a dud version of query.class.php as that is where addReplace is defined. Check that you haven't patched that file at some point - classes/query.class.php
__________________

http://www.saki.com.au/ - The driving force behind dotProject
Latest dotProject Release: 2.1.2 Download now
Nightly Stable 2 Snapshot
Reply With Quote
  #6  
Old 04-10-08, 04:53 AM
renowong renowong is offline
Junior Member
Return Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 11-03-08
Posts: 6
Default Re: SQL Syntax Error

Hello there,

open up "tasks.class.php" in the \modules\tasks folder and edit line 1305

change "$q->addQuery('COUNT(ut.*) AS user_task_count');" ---> "$q->addQuery('COUNT(*) AS user_task_count');"

That should fix your problem

Cheers!

Reno

Reply With Quote
  #7  
Old 03-09-09, 03:43 PM
Siva G Siva G is offline
Junior Member
New Participant
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 03-09-09
Posts: 1
Smile Re: SQL Syntax Error

Reno,

Thnx vm , Solved my issue.

Cheers
Siva G

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 10:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.