Welcome to the Monastery | |
PerlMonks |
Re^3: Combining Ffile:fetch with MySQLby Marshall (Canon) |
on Jul 18, 2022 at 18:28 UTC ( [id://11145579]=note: print w/replies, xml ) | Need Help?? |
Ok, now I understand better. You are using an existing DB, not making one? You need to use the Perl DBI - Data Base Interface. There are links to the FAQ's and some tutorials. You can see some Monk links here: https://www.perlmonks.org/?node=Tutorials#Database-Programming.
A wild guess and some untested example code would be: Update: I see that you are using MySQL instead of SQLite. Brain cramp on my part. But code is essentially the same - just a difference in how to get the DB connection. The dbi would be: dbi::MySQL, then you need an account and password. For SQLite, these are null strings. See the doc's referenced above for a connection example with username/password.
I can't anticipate exactly what kind of SQL you need. Above just gets docs for a particular date. Although sounds like what you need is: for each unique id, download latest version of the document. The SQL for that is of course more involved but doable. Hope this gets you further along your way.
In Section
Seekers of Perl Wisdom
|
|