php - stored procedure error:Subquery returns more than 1 rows -


i trying create stored procedure giving me error: subquery returns more 1 row below query . done using cursors there other ways directly run query in stored procedures without using cursors since there multiple queries of type need add in stored procedure multiple tables.

query:-

update ipcc_patent_ipc_class set assignee_type = ( select if(ipcc_patent_master.assignee_type='$ipcc_config_param[0]',$ipcc_config_value[0],if(ipcc_patent_master.assignee_type='$ipcc_config_param[1]',$ipcc_config_value[1],null)) ipcc_patent_master ipcc_patent_ipc_class.patent_id = patent_uid); 

but query works multiple field:-

update ipcc_patent_ipc_class set geographies_id=(   select ipcc_geographies.geographies_uid   ipcc_patent_master,ipcc_geographies   ipcc_patent_master.geographies = ipcc_geographies.geographies   , ipcc_patent_ipc_class.patent_id = ipcc_patent_master.patent_uid ), jurisdictions_id =(   select ipcc_jurisdictions.jurisdisctions_uid   ipcc_patent_master,ipcc_jurisdictions   ipcc_patent_master.jurisdictions = ipcc_jurisdictions.jurisdictions   , ipcc_patent_ipc_class.patent_id = ipcc_patent_master.patent_uid ), country_code_id =(   select ipcc_country_code.country_code_uid   ipcc_patent_master,ipcc_country_code   ipcc_patent_master.country_code= ipcc_country_code.country_code   , ipcc_patent_ipc_class.patent_id = ipcc_patent_master.patent_uid );  

add limit clause in sub query.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -