Hello,
is it possible to use letters and numbers instead of only letters for the CAT-ID ?
Old: cat-id = 12345
Nw: cat-id = 12345-1
or = 12345a
?
Frank
Hello,
is it possible to use letters and numbers instead of only letters for the CAT-ID ?
Old: cat-id = 12345
Nw: cat-id = 12345-1
or = 12345a
?
Frank
The cat id is defined as numeric in the mysql table AND even more important, it is defined as a unique field. You could change it to text/varchar IF you can find a way to uniquely indentify each row. The reason it MUST be unique is that queries use it to pull info for a specific category. thus you could not have duplicate Cat IDs.
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.
Yep, thats my problem, I have an import with some cats that have the same parent and if I import them, only the first will go, because the cat-id is double.
Now I'm searching for a good way to change the cat-id of my import and the easiest way could be a change into a new index like cat-id = 123456a or something like this.
At the moment the filed is an integer - what is the right format to use also "-" and "letters" ?
Frank
the problem is that the field is also to auto-number which means that each time a new listing is actually added the next available ID number is used thereby insuring a unique identifier. You cannot use the auto-number feature if you use text like 12345a or 12345-a.
You probably need to renumber your import.
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.
ESM,
So you say change the table to text/varchar and turn off the autonumber ?
If thats all you would have to do would it work on the link database the same way, where the link id was text/varchar and not autonumber?
Allen
it depends. the link_id or category_id has to be unique. consider the following example where you are trying to modify a single link or category:
select * from idx_link where link_id = ?????
or
select * from idx_category where category_id = ?????
( the above is kind of like a FIND record )
in each situation you want only one record (link/category) returned.
the autonumber is just a way to guarantee a unique identifer for each record and do it under program control. otherwise the admin must get involved.
the link_id or category_id ABSOLUTELY MUST be unique. Or some field must be unique in the record to allow for finding a particular record. If you control the add record manually and could assign the ID or if you add code to check for an existing ID already in the table, then you could probably change it to text.
although the conversation kind of degenerated and got off topic you can see some more at http://www.nicecoder.com/community/s...&threadid=1810
If you are thinking about your site, you might be able to do it since you have unique numbers for each item.
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."
.