I want to make a MySQL table called `md5` and `no`... I also need to stop duplicate entries from getting in. How would I do that?
Help appreciated :]

I want to make a MySQL table called `md5` and `no`... I also need to stop duplicate entries from getting in. How would I do that?
Help appreciated :]
if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.
To make a table(s) I'd suggest reading this.
http://www.tizag.com/mysqlTutorial/mysqltables.php
Read most of the page, especially 'PRIMARY KEYS', using BIG Int or SMALL with 'AUTO_INCREMENT' (When an entry is added, the number goes up UNIQUELY)
This link below will explain the field types;
http://help.scibit.com/Mascon/mascon...eld_Types.html
etc.PHP Code:CREATE TABLE `drift_userdb`.`tablename` (
`id` BIGINT NOT NULL AUTO_INCREMENT ,
`md5` TEXT NOT NULL ,
`no` TEXT NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (`md5`)
) ENGINE = MYISAM
Hi, names James. I am a web developer.
thx +rep
if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.
No problem.
Hi, names James. I am a web developer.
#1170 - BLOB/TEXT column 'md5' used in key specification without a key length comes up when I try to enter
Can you fix it?CREATE TABLE `md5` (
`id` BIGINT NOT NULL AUTO_INCREMENT ,
`md5` TEXT NOT NULL ,
`no` TEXT NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (`md5`)
) ENGINE = MYISAM
if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.
I don't usually make them by hand I use phpMyAdmin to create them but maybe because you've called the table "md5" and the column "md5"
Hi, names James. I am a web developer.
Tried it, didn't work.
if PHP is peanut butter...then...MySQL would be the jelly. Together they can make one heck of a good sandwich.
It's something you have to play around with to get used to it, if something goes wrong for me, I usually play around with it till it works.
Hi, names James. I am a web developer.
Try renaming your table/column... MD5 is a function in both SQL and PHP which under normal circumstances would mean it can't be used as a name for any entity/instance.
Want to hide these adverts? Register an account for free!