this following code:
//Add Template Documentation
$sql2 = "SELECT (doctype, templatename)FROM templates_documents WHERE templates_document.scope = '".$values["msscope"]."'";
$result = mysql_query($sql2);
$row = mysql_fetch_array($result);
$sql = "INSERT INTO documents_doucments (companyfk, doctype, doctitle) values('".$values["companypk"]."','$row[doctype]','$row[templatename]')";
Is giving me the following error:
mysql_fetch_array() expects parameter 1 to be resource, boolean given