-
Notifications
You must be signed in to change notification settings - Fork 303
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
SQL error when accessing preferred individual (#1) #672
Comments
This particular function is new for 1.7 It loads all members of a family in one SQL query to improve performance. The query is very simple, and I cannot see any obvious errors. Can you add some debug to see what is happening. app/Individual.php, line ~58:
Change to
You should now see debug info on the individual page. |
That var_dump gives me: string(12) ",:x1,:x2,:x3"
array(4) {
["tree_id"]=> int(1)
["x1"]=> string(2) "16"
["x2"]=> string(1) "3"
["x3"]=> string(1) "4"
} |
Can you add one more line of debug
|
That gives: array(4) {
[0]=> string(1) "1"
[1]=> string(2) "16"
[2]=> string(1) "3"
[3]=> string(1) "4"
} |
Thanks. I see the problem now.. |
Unfortunately i was on a trip and was not able to help. However, i can confirm that the fix resolved the issue that i had. |
Created a tree and inserted records from a .ged-file. After that, added and updated records manually. At some point in time, i tried to access the preferred individual (me, record nr 1) and got the following error:
#0 /app/Statement.php:82 PDOException("SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''223')' at line 1")
#1 /app/Individual.php:64 execute()
#2 /app/Family.php:45 load()
#3 /app/GedcomRecord.php:205 __construct()
#4 /app/Fact.php:97 getInstance()
#5 /app/Controller/GedcomRecordController.php:48 getTarget()
#6 /app/Controller/IndividualController.php:61 __construct()
#7 /individual.php:31 __construct()
I am running webtrees 1.7.1. and php 5.5.x. I have been using older versions of webtrees (1.6.2) without seeing this type of error before.
The text was updated successfully, but these errors were encountered: