can someone tell me what is wrong with this?
Error
SQL query: -
CREATE TABLE uploads(
-
-
upload_id int( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
-
file_name VARCHAR( 30 ) NOT NULL ,
-
file_size INT( 6 ) UNSIGNED NOT NULL ,
-
file_type VARCHAR( 30 ) NOT NULL ,
-
description VARCHAR( 100 ) DEFAULT NULL ,
-
date_entered TIMESTAMP,
-
PRIMARY KEY ( upload_id ) ,
-
KEY ( file_name ) ,
-
KEY ( date_entered )
-
) CREATE TABLE urls(
-
url_id SMALLINT( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
-
url VARCHAR( 60 ) NOT NULL ,
-
title VARCHAR( 60 ) NOT NULL ,
-
description SMALLTEXT NOT NULL ,
-
PRIMARY KEY ( url_id )
-
) CREATE TABLE url_categories(
-
url_category_id SMALLINT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
-
category VARCHAR( 20 ) NOT NULL ,
-
PRIMARY KEY ( url_category_id )
-
) CREATE TABLE url_associations(
-
ua_id SMALLINT( 4 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
-
url_id SMALLINT( 4 ) UNSIGNED NOT NULL ,
-
url_category_id TINYINT( 3 ) UNSIGNED NOT NULL ,
-
date_submitted TIMESTAMP,
-
approvedCHAR( 1 ) DEFAULT 'N' NOT NULL ,
-
PRIMARY KEY ( ua_id )
-
)
-
MySQL said:
#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 'CREATE TABLE urls (
url_id SMALLINT(4) UNSIGNED NOT NULL AUTO_INCREMENT, url VA' at line 7
2 1739 pbmods 5,821
Recognized Expert Expert
Heya, Wadro.
There are two things wrong with the code you posted: - You didn't use CODE tags. Bad!
- You're missing a semicolon after each table declaration.
Thanks again!
i will try to remember to put my code in tages next time.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: dave |
last post by:
Hello there,
I am at my wit's end ! I have used the following script succesfully to
upload an image to my web space. But what I really want to be able to do is
to update an existing record in a table in MySQL with the path & filename to
the image.
I have successfully uploaded and performed an update query on the database,
but the problem...
|
by: Lenz Grimmer |
last post by:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
MySQL 4.0.14, a new version of the popular Open Source/Free Software
Database, has been released. It is now available in source and binary form
for a number of platforms from our download pages at
http://www.mysql.com/downloads/ and mirror sites.
|
by: Ed Smith |
last post by:
I have two questions about REFERENCES:
1. It appears that mySQL treats REFERENCES associated with an
attribute differently than FOREIGN KEY (<blah>) REFERENCES...
Specifically, the first form does not appear to work, while the later
does. Here's a simple example (slightly edited):
mysql> CREATE TABLE person (id char(5) primary key);...
|
by: Mike Chirico |
last post by:
Interesting Things to Know about MySQL
Mike Chirico (mchirico@users.sourceforge.net)
Copyright (GPU Free Documentation License) 2004
Last Updated: Mon Jun 7 10:37:28 EDT 2004
The latest version of this document can be found at:
http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
|
by: James E Koehler |
last post by:
I can't get the WHILE statement to work in MySQL.
The version of MySQL that I am using is:
Ver 12.16 Distrib 4.0.6-gamma, for Win95/Win98 (i32)
running on Windows MX.
Here is the relevant section from the manual:
20.1.9.7 WHILE Statement
| |
by: jrs_14618 |
last post by:
Hello All,
This post is essentially a reply a previous post/thread
here on this mailing.database.myodbc group titled:
MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode
I was wondering if anybody has experienced the same issues
|
by: mistral |
last post by:
Need php script to create mySQL database programmatically; since
hosting configuration may not allow create database from script, script
also need eliminate/rewrite all restrictions in appropriate places in
that hosting.
|
by: Atli |
last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t.
In situations where your PHP application needs to store entire files, the preferred method is to save the file onto the server’s file-system, and store the physical location of the file in...
|
by: ssnaik84 |
last post by:
Hi Guys,
Last year I got a chance to work with R&D team, which was working on DB scripts conversion..
Though there is migration tool available, it converts only tables and constraints..
Rest of things (stored procedures, functions).. we have to manually edit.
That time, we face some interesting challenges.. I failed to document all of them,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |