Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

will this code do?

y2kbgy2kbg New
edited December 2006 in Vanilla 1.0 Help
if (!array_key_exists('friendssqlcheck', $Context->Configuration)) { $SQL = file_get_contents($Context->Configuration['EXTENSIONS_PATH'] . 'Friends/friends-mysql.sql'); $Context->Database->Execute($SQL, 'Friends', NULL, 'Could not create Friends table'); if ($Context->ErrorManager->Iif()) { AddConfigurationSetting($Context, 'friendssqlcheck', '1'); }}

to execute an sql query(contained in an external file) successfully once but if it messes up it will try again next time this code is run?

Comments

  • You know, it might be better to stay in the 'what does this code do' discussion, otherwise this question is out of context. The code looks fine to me, but your PHP interperter may feel otherwise. Test it out and see.
  • your asking the same question again..? we explained it to you in the other thread
  • well I changed it a little and wanted to make sure it was right before i tested it and messed up my database or something. I guess I should have stayed in other thread, sorry.
This discussion has been closed.