the SELECT doesnt behave the same way in XP than in linux,
could be a configuration issue, but I'm far away that knowledge
if not, there is a platform issue regarding Mysql.
can't make it work
Moderator: General Moderators
YOU'RE RIGHT
when changed the comparition (in XP) to != ,the error stopped...
Since I used to store dates in yyyy/mm/dd,
it was natural to compare them in alphanum,
I prefer alphanum because can manipulate them easily.
I didn't find in mysql manual,
if a primary key can be multi-fields.
All my data model is based on dates...
Since I used to store dates in yyyy/mm/dd,
it was natural to compare them in alphanum,
I prefer alphanum because can manipulate them easily.
I didn't find in mysql manual,
if a primary key can be multi-fields.
All my data model is based on dates...
-
microthick
- Forum Regular
- Posts: 543
- Joined: Wed Sep 24, 2003 2:15 pm
- Location: Vancouver, BC
Yes, alphanum makes sense, I guess.
Primary keys can be multi-fields. But usually you'll make your primary key some ID field, then you can make another key (though not primary) from the multiple fields.
Technically, the database won't be normalized properly, but this is the real-world, and unless you have space constraints for your database, it's more convenient to have a redundant single field primary key.
Primary keys can be multi-fields. But usually you'll make your primary key some ID field, then you can make another key (though not primary) from the multiple fields.
Technically, the database won't be normalized properly, but this is the real-world, and unless you have space constraints for your database, it's more convenient to have a redundant single field primary key.
keys
fields: date, unit, code
primary key: date+unit+code
I used this schema with great results
is that what you mean?
another issue about mysql SELECT:
in Linux (fine)
in XP (localhost): after deleted a record,
each time I click on "show all" buton
alternatively shows and hides the deleted record (crazy)
to avoid this I have to reload the page, wonder why is different
primary key: date+unit+code
I used this schema with great results
is that what you mean?
another issue about mysql SELECT:
in Linux (fine)
in XP (localhost): after deleted a record,
each time I click on "show all" buton
alternatively shows and hides the deleted record (crazy)
to avoid this I have to reload the page, wonder why is different
more testing
I won't start programming until I can control I/O results
so I'm testing,
in XP, when creating records,
one after another, msg is always ok
but it only creates 1 out of 2 !!!
in twelve writes in a row (0 to 11)
when browse the dbase only 0,2,4,6,8,10 where there,
I repeated this many times and was always the same.
I even shutdown the PHPmyadmin browser
and still same results
In the copy on-line (linux) fine!
Maybe you could try my code on your XP
to compare...
so I'm testing,
in XP, when creating records,
one after another, msg is always ok
but it only creates 1 out of 2 !!!
in twelve writes in a row (0 to 11)
when browse the dbase only 0,2,4,6,8,10 where there,
I repeated this many times and was always the same.
I even shutdown the PHPmyadmin browser
and still same results
In the copy on-line (linux) fine!
Maybe you could try my code on your XP
to compare...
-
microthick
- Forum Regular
- Posts: 543
- Joined: Wed Sep 24, 2003 2:15 pm
- Location: Vancouver, BC
Re: keys
Well, date+unit+code is a fine primary key. But it's a nuisance for you to use that as your primary key. Say you have other tables in your database that need to reference that rec_ table. You'd have to use date+unit+code to create a relationship. By making a primary key called id or something, it makes doing JOINs easier. You could still have date+unit+code being a key, just not primary key.lisawebs wrote:fields: date, unit, code
primary key: date+unit+code
I used this schema with great results
is that what you mean?
another issue about mysql SELECT:
in Linux (fine)
in XP (localhost): after deleted a record,
each time I click on "show all" buton
alternatively shows and hides the deleted record (crazy)
to avoid this I have to reload the page, wonder why is different
-
microthick
- Forum Regular
- Posts: 543
- Joined: Wed Sep 24, 2003 2:15 pm
- Location: Vancouver, BC
Re: more testing
I'm at work right now, but I should be able to try your code at home this weekend.lisawebs wrote:I won't start programming until I can control I/O results
so I'm testing,
in XP, when creating records,
one after another, msg is always ok
but it only creates 1 out of 2 !!!
in twelve writes in a row (0 to 11)
when browse the dbase only 0,2,4,6,8,10 where there,
I repeated this many times and was always the same.
I even shutdown the PHPmyadmin browser
and still same results
In the copy on-line (linux) fine!
Maybe you could try my code on your XP
to compare...