Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MySQL Query not manipulating table columns and giving error

Posted on 2008-10-02
1
Medium Priority
?
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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.

662 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