-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Relationship field selection gives array_merge warning & filed name error with Pods 2.1 #860
Comments
It happens only if we have 3rd level reference. in my case its course.degree.degree_code it works fine for second level. Any Idea? |
Can you give me details for:
I probably don't need the entire list of pods and every field, just enough to be able to put something together from scratch that demonstrates the error. The quicker it is for me to see it myself, the quicker we can get it fixed up. |
Hi,
Now i wants to select list of courses offered by university based 'M.S' degree code by selecting relationship from 'university_course' pod object like $params['where'] = "university.name` ='xxxxxx' and course.degree.degree_code='M.S'"; $univ_course = pods('university_courses', $params); I'm getting error only we try to select in the third level |
Thanks, I'll get around to this tonight. |
Try http://pods.io/latest/ and let me know if it's working for you now |
Hi, Let you know if any issue. :) |
Tested in production site with sc0ttkclark's fix. Its working fine |
We are getting following warning while trying to use relationship filed in the where clause
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in ...\wp-content\plugins\pods\classes\PodsData.php on line 2078
Also getting following warning while we try 3rd level relationship
Warning: array_merge() [function.array-merge]: Argument #3 is not an array in ...\wp-content\plugins\pods\classes\PodsData.php on line 2056
Finally relationship field names are getting changed as follows:
$params['where'] = "university.name` ='" . mysql_escape_string($d[0]) . "' and course.name='" . mysql_escape_string($d[2]) . "' and course.degree.degree_code='" . mysql_escape_string($d[1]) . "' and t.mode='" . mysql_escape_string($d[3]) . "'";
Error:
Database Error; SQL: SELECT DISTINCT
t
.id
FROMap_pods_university_course
ASt
WHEREuniversity
.name
='Gurukula Kangri Vishwavidyalaya' andcourse
.name
='Zoology & Environmental Science' andcourse_degree
.degree_code
='M.Sc' andt
.mode
='Full Time' ORDER BYt
.name
,t
.id
LIMIT 0, 15; Response: Unknown column 'university.name' in 'where clause'But it was worked before upgrading into 2.1
The text was updated successfully, but these errors were encountered: