Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
483 views
in Plugins by

Trying to add column with below function and when we going to plugin page it is adding column properly but than after that when visit plugin page taking long time and loads nothing.

 

function init_queries($tableslc){
 
$table = qa_db_add_table_prefix('users');
$col = "SELECT checking FROM ".$table;
 
if(!in_array($col, $tableslc)){
 
$insert_col = "ALTER TABLE ".$table." ADD checking DATETIME NOT NULL";
 
qa_db_query_sub($insert_col);
 
}
 
}

 

Q2A version: 1.5.3

1 Answer

+1 vote
by
selected by
 
Best answer

Use SHOW COLUMNS FROM table to get the list of columns in a table.

by
Wonderful! thanks a lot.
...