Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MySQL Query not manipulating table columns and giving error

Posted on 2008-10-02
1
Medium Priority
?
223 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

916 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