vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Product Install Problem (https://vborg.vbsupport.ru/showthread.php?t=219456)

1Unreal 07-25-2009 07:29 PM

Product Install Problem
 
Ive got an install code on a product which looks like this

PHP Code:

$db->hide_errors();
$db->query_write("ALTER TABLE " TABLE_PREFIX "user ADD column VARCHAR(100) NOT NULL");
$db->show_errors(); 

But it just does nothing

Lynne 07-25-2009 08:38 PM

If this is a problem with a modification, then you need to post in the modification thread for help. If this is a product you are writing yourself, then you should get rid of the hid_errors line for debugging purposes to see what error is occuring.

1Unreal 07-25-2009 08:49 PM

Its my own and ive tried that already.

Lynne 07-25-2009 08:52 PM

Have you tried giving it another name besides 'column'? I wonder if that is a field name not allowed for a new column in a table.

1Unreal 07-25-2009 09:17 PM

Its not called column I just changed it for the examples sake

Paul M 07-25-2009 10:21 PM

It must do something, either you get an error, or the column gets added, it cannot do nothing.

Assuming of course that its being run in the first place, are you sure that happens ?

1Unreal 07-26-2009 12:34 AM

I uploaded it onto a different forum and it worked. Not sure why it didn't on my test board.

Dismounted 07-26-2009 05:34 AM

Get rid of the "hide_errors()" call to display the errors.

Marco van Herwaarden 07-27-2009 08:24 AM

Quote:

Originally Posted by 1Unreal (Post 1855379)
Its not called column I just changed it for the examples sake

If you give examples that are different then the real issue, then how do you think we can help?

sebaot 07-27-2009 07:05 PM

Maybe there's some prefix on the tables and you need to add ` in the statement, like:
Code:


$db->hide_errors();
$db->query_write("ALTER TABLE `" . TABLE_PREFIX . "user` ADD column VARCHAR(100) NOT NULL");
$db->show_errors();



All times are GMT. The time now is 12:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01064 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete