How could i get the column name of an empty record from a table ? For example:
SELECT column.name FROM table WHERE id='1111' AND column_name=''
It should return every title of an empty column from table.
How could i get the column name of an empty record from a table ? For example:
SELECT column.name FROM table WHERE id='1111' AND column_name=''
It should return every title of an empty column from table.
i would do it with php for simplicity's sake, however there might be a sophisticated mysql approach to do this at dbms level
in PseudoCode:
$result = MYSQL_FETCH_ASSOC ( MYSQL_QUERY( SELECT * FROM table WHERE id='1111' ) )
$blankCols = array();
foreach($result[0] as $key=>$value){
if($value=="")
{
$blankCols[] = $key;
}
}
as i mentioned before, this seems ugly and looks like a bad data structure design.