Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

infusion table altering issue

Asked Modified Viewed 3,254 times
A
Arda
A
Arda 10
  • Member, joined since
  • Contributed 150 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
asked
Member

hi, i've this sql code n my infusion that i'm coding, i can't find anything unusual about this, but when i infuse the mod, it just doesn't work and alter the table. what am i missing? thanks

$inf_altertable[1] = DB_USERS." ADD user_yazar TINYINT(1) UNSIGNED DEFAULT '0' AFTER user_sig";


and is that possible to run an altering table query while defusing an infusion ? something like "tablename drop coloumn etc etc.."

thanks :)
Edited by Arda on 02-09-2008 23:45,
0 replies

2 posts

W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

You can only manage a table created by the infusion with the $inf_altertable[1].

To manage any other table you can add code like this to your infusion.php:

// Change of core table below.
if (isset($_POST['infuse']) && isset($_POST['infusion'])) {
$result = dbquery("ALTER TABLE ".DB_USERS." ADD user_yazar TINYINT(1) UNSIGNED DEFAULT '0' AFTER user_sig");
}

// Restore of core table below.
else if (isset($_GET['defuse']) && isnum($_GET['defuse'])) {
$result = dbquery("ALTER TABLE ".DB_USERS." DROP user_yazar");
}
0 replies
A
Arda
A
Arda 10
  • Member, joined since
  • Contributed 150 posts on the community forums.
  • Started 11 threads in the forums
  • Started this discussions
answered
Member

oh i see the point now, so i just can't do it with current variable arrays, thanks :)
Edited by Arda on 03-09-2008 00:23,
0 replies

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet