I am trying to populate a table by executing the below query for a php application:
$sql3 = "SELECT distinct(`t1.testName`), `t2.comments AS C1` from `sample AS t1` left join `sample AS t2` ON `t1.testName`= `t2.testName` where `t1.buildNumber`= 181 and `t2.buildNumber`= 180 and `t1.errorStackTrace` is not null";
$result3 = mysqli_query($dbconnect,$sql3);
if(!mysqli_query($dbconnect, $sql3)){
printf("error message: %s\n",mysqli_error($dbconnect));
}
I am seeing the following error returned:
error message: Table 'testdata.sample as t1' doesn't exist
I have tried a lot to fix this but couldn't. The query runs fine when run on mysql. Any help would be appreciated. Thanks
$sql3 = "SELECT distinct(t1.testName), t2.comments AS C1 from sample AS t1 left join sample AS t2 ON t1.testName= t2.testName where t1.buildNumber= 181 and t2.buildNumber= 180 and t1.errorStackTrace is not null";