Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-23-2006, 07:49 AM   #1 (permalink)
l33t_1-1axx0r
Huzzah!
 
l33t_1-1axx0r's Avatar
 
Join Date: Feb 2006
Posts: 8
l33t_1-1axx0r is on a distinguished road
Send a message via AIM to l33t_1-1axx0r Send a message via MSN to l33t_1-1axx0r Send a message via Yahoo to l33t_1-1axx0r
I'm being yelled at

alter table 'user' add column 'shouts' integer NOT NULL default = '0'


Using MySQL 5.0.

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''user' add column 'shouts' integer NOT NULL default = '0'' at l


Pretty detailed, huh? Can you not alter table and populate with default value at the same time?
l33t_1-1axx0r is offline   Reply With Quote
Old 02-23-2006, 08:37 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
try this:
Code:
ALTER TABLE `user` ADD `shouts` INT UNSIGNED NOT NULL DEFAULT '0';
sde is offline   Reply With Quote
Old 02-23-2006, 09:33 AM   #3 (permalink)
l33t_1-1axx0r
Huzzah!
 
l33t_1-1axx0r's Avatar
 
Join Date: Feb 2006
Posts: 8
l33t_1-1axx0r is on a distinguished road
Send a message via AIM to l33t_1-1axx0r Send a message via MSN to l33t_1-1axx0r Send a message via Yahoo to l33t_1-1axx0r
Thanks
l33t_1-1axx0r is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 10:27 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting