Displaying 1 result from an estimated 1 matches for "organization_name".
Did you mean:
organisation_name
2011 Oct 19
4
Using SQL "IN" with RJDBC or RMySQL
...BC("com.mysql.jdbc.Driver",
"/home/davideps/Software/extlibs/mysql-connector-java-5.0.7-bin.jar",identifier.quote="`")
conn <- dbConnect(drv, "jdbc:mysql://localhost/civicrm",
"userid","pass")
org_table=dbGetQuery(conn,"SELECT id,organization_name FROM
civicrm_contact WHERE contact_type=?","organization")
dbGetQuery(conn,"SELECT id from civicrm_relationship WHERE contact_id_a
IN ? AND contact_id_b IN ?",org_table$id,org_table$id)