Solved

MySQL Query not manipulating table columns and giving error

Posted on 2008-10-02
1
218 Views
Last Modified: 2013-12-12
Hi,

I am having problem running an SQL query in PhpMyAdmin and I am getting following error doing it.

#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 'NO NULL AFTER name' at line 1


any help on this would be appreciated.

Thanks.
ALTER TABLE jos_users ADD business VARCHAR (100) NO NULL AFTER name;
 
ALTER TABLE jos_users ADD phone VARCHAR (100) NO NULL AFTER business;

Open in new window

0
Comment
Question by:mdadnan
1 Comment
 
LVL 17

Accepted Solution

by:
HuyBD earned 125 total points
ID: 22622213
change to not null
ALTER TABLE jos_users ADD business VARCHAR (100) NOT NULL AFTER name;
 
ALTER TABLE jos_users ADD phone VARCHAR (100) NOT NULL AFTER business;

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question