sql - MySQL String, check is column exists -
i creating column created current date if not exist. current query check column name , create 1 if not exist. variable $date
, not work, please can suggest wrong it.
$result = mysqli_query($con," if not exists ( select * information_schema.columns table_name = 'scouts' , column_name = '$date' ) begin alter table scouts add '$date' varchar( 255 ) end ");
sql injection not problem being hosted on local machine. sorry if wasn't clear @ first.
Comments
Post a Comment