hello evreyone,
this code is open the table "psher" and 9 Columns.
PHP Code:
Queries = SQL_PrepareQuery(SqlConnection,"CREATE TABLE IF NOT EXISTS psher( steamid varchar(32), name varchar(32), column1 SMALLINT(1), column2 SMALLINT(1), column3 SMALLINT(1), column4 SMALLINT(1), column5 SMALLINT(1), column6 SMALLINT(1),column7 SMALLINT(1), column8 SMALLINT(1), column9 SMALLINT(1))")
and i thought to do it like this:
PHP Code:
new const tablenames[] =
{
"column1",
"column2",
"column3",
"column4",
"column5",
"column6",
"column7",
"column8",
"column9"
}
for(new i = 0; i < 9; i++)
{
Queries = SQL_PrepareQuery(SqlConnection,"CREATE TABLE IF NOT EXISTS psher( steamid varchar(32), name varchar(32), %s SMALLINT(1))", tablenames[i])
}
but there is a problem i thinks because "CREATE TABLE IF NOT EXISTS" and table is already exists so its won't open another column..
someone has an idea how i can do this in my way( array ) , How to make it work?
thanks for helping