• Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Bablosoft

How do you compare values from database? Like closest date to current date from DB entries?

Scheduled Pinned Locked Moved Support
1 Posts 1 Posters 880 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yourfriendkarol
    wrote on last edited by yourfriendkarol
    #1

    I have managed it once with very workaroundish way but it was tough and not practical.

    Lets say I have database with 1000 entries, they all have few variables like username, password, DATE, record ID(obviously).

    so I use Foreach Loop > parse line (I assign these values to variables) > What I do now?

    I want to have records IDs of entries with date variable (basically date of creation that entry) that happened to be in current week.

    How can I achieve it?

    And how can I tell which one of these entries has closest date to now?

    How would I do it is to create a foreach, literate through each date and record id, then separate them into two lists, one for RECORD ID and one for DATE and then just compare dates with some javascript code idk choose the closest date to now, and then I will use record ID that has same index on second list that this date has on its own list..

    I mean i created these two lists so each date's record id WOULD be on the same index as date, but in different list.

    but as you can see - its really really workaroundish

    1 Reply Last reply
    0

  • H

    I wonder if there is a module to set up a proxy like the SwitchyOmega Proxy extension?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    424 Views
    No one has replied
  • Pavel Duglas BasP

    HTTP CLIENT n Date and Time - MODULE

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    464 Views
    No one has replied
  • S

    How to sum value of two variables plz help

    Scheduled Pinned Locked Moved Support
    1 Votes
    1 Posts
    459 Views
    No one has replied
  • ?

    Get a random date of birth specifying the age and with 6 months before birthday date?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    555 Views
    No one has replied
  • Y

    How to use one database in several projects?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    964 Views
    No one has replied
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
  • Login

  • Don't have an account? Register

  • Login or register to search.