Re: cross join check syntax please
Posted by:
John carey
Date: April 25, 2022 05:22PM
//*********************************************************************
$servername = "db5005980166.hosting-data.io";
$username = "dbu1511040";
$password = "myAcct1^db";
$dbname = "dbs5009628";
//*********************************************************************
$sql = "insert into mygallery(refnbr,custid,pseudo,musician,nickname,group1,description,date,status,price,picture,email,custid1)
values('$refnbr','$custid','$pseudo','$musician','$nickname','$group1','$description','$date','$status','$price','$picture','$email','$custid1')";
// *********************************************************************
$query=mysqli_query($con,"select * from mygallery
CROSS JOIN subscribe
where mygallery.custid = subscribe.custid1
order by mygallery.refnbr desc");
//**********************************************************************
// records added when not suppose to add. no error messages. if
// mygallery.custid != subscribe.custid record should not be added to
// database.($dbname = "dbs5009628";)(table=mygallery)However it is being
// added.