vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   mysql query help (https://vborg.vbsupport.ru/showthread.php?t=82241)

Rickie3 05-30-2005 11:06 AM

mysql query help
 
i'm trying to execute a query for a hack,query as follows

alter table user add timespent int not null;

when i run the query this is the error i get

Error

SQL-query:

ALTER TABLE user ADD timespent int NOT NULL

MySQL said: Documentation
#1146 - Table 'satsfge_.user' doesn't exist

in the instructions for the hack it says
Run the following queries. You can do it via phpmyadmin, or at the
"Execute SQL Query" section at the Admin Control Panel
Remember to prefix the table if you need to.
any help appreciated

Marco van Herwaarden 05-30-2005 11:22 AM

You seem to be using a table prefix, add that in front of 'user'.

Edit i only beat ZT because i gave the short answer. ;)

Zero Tolerance 05-30-2005 11:22 AM

Change "user" to "{PREFIX}user", your table prefix is defined in includes/config.php

So if your prefix was 'vb3_', it would be:
[sql]ALTER TABLE vb3_user ADD timespent int NOT NULL[/sql] :)

Edit: Marco beat me too it >.<

- Zero Tolerance

Colin F 05-30-2005 12:52 PM

or, if you included global.php somewhere, use

[sql]$DB_site->query("ALTER TABLE " . TABLE_PREFIX . "user ADD timespent int NOT NULL");[/sql]

Marco van Herwaarden 05-30-2005 01:44 PM

Quote:

Originally Posted by Colin F
or, if you included global.php somewhere, use

[sql]$DB_site->query("ALTER TABLE " . TABLE_PREFIX . "user ADD timespent int NOT NULL");[/sql]

I don't think this is in a script Colin. It is just installation instructions for a hack.

Colin F 05-30-2005 04:00 PM

Quote:

Originally Posted by MarcoH64
I don't think this is in a script Colin. It is just installation instructions for a hack.

Oh ok... disregard what I said :)

Rickie3 05-31-2005 05:00 AM

thankyou so much guys for your support,it worked a treat,and the best part is ive learned in the process,thankyou.


All times are GMT. The time now is 03:49 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.01555 seconds
  • Memory Usage 1,717KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete