gonz
-
Posts
3 -
Joined
-
Last visited
Posts posted by gonz
-
-
I am new to PHP, but this is what I wrote:
update equip set equip.eqlkl = select movto from eqmove where equip.eqnum=eqmove.eqp and eqmove.movdate=max(eqmove.movdate)order by desc eqmove.id limit 1;
I am here in this forum because it is not working.
-
Hi all. I have set up a couple of tables in my equipment control database. One table has one record per piece of equipment, the other table has the date and location of where the tool is (was) used. I need to update the field in the equipment table that shows where the equipment IS (lastloc) with the move to field (movto) from the location table. There is a one to many relationship between the location table and the equipment table, that way I can keep the use history of the equipment, so I need to pick out the last entry for that equipment (movdate) would have to be used for ordering the data subset.
Update table
in PHP Coding Help
Posted
I understand the no duplicating data concept, but it makes it so much easier to show only one table to the users with that last location - much like an invoice total in the header record is not really necessary as you can always recalculate it!!