Forums

load ony latest record from database

fuxo 12 Apr, 2012
Hi guys,

sorry for my english, i am beginner🙂

For my project i must load only actualy latest record in database.
I used DB Record Loader and load record with token, but this solution is inappropriate in this case.

Can anyone help me?
Thanks very much for your answers.
GreyHead 13 Apr, 2012
Hi fuxo,

I haven't tested this but from looking at the MySQL manual I think this will do what you need
WHERE `id` = LAST_INSERT_ID()


Bob
fuxo 13 Apr, 2012
hi bob,

thank you for your answer. I am MySQL newbie and i don't understand of a syntax.

My records in database do you see on screenshot below:



My questions:
in "WHERE" will code
 WHERE `id` = LAST_INSERT_ID()
or others code?

field "Request Param" will empty?
in field: "DB Field" will "cf_id"?

Is needed more changes in fields?
Or my ideas is completly wrong?
GreyHead 13 Apr, 2012
Hi fuxo,

You haven’t said where you are using this code so it's hard to answer. I'd expect that you need to use cf_id and put the WHERE clause in the WHERE box (possibly without the WHERE).

Bob
fuxo 13 Apr, 2012
Thanx Bob,

i am realy database noob... 🙂
okey, i ask otherwise:

it’s posible to load only latest prices from database(tokio_cena, newyork_cena, paris_cena)? This prices is actual on row with cf_id = 3 (you can seen on picture, but in this forum is visible only from one half).
Next rows will be permenently added.

When yes, how?
fuxo 13 Apr, 2012
Hi Bob,

i will try resolve my problem with your tutorial "CFV4_db_multi_record_loader". In this tutorial i found instructions to update my prices in specific row, who is also eventual solution.

Thank you for your time.
This topic is locked and no more replies can be posted.