Dlookup equivalent in php
Is there an equivalent of the VBA function DLookup() in php?
Is there an equivalent of the VBA function DLookup() in php?
Are you trying to get data from an Access database?
No. Its just that I use dlookup a lot in MSAccess applications on my computer, and was wondering if there was an equivalent command in PHP for use in websites? Any links I could find for that question on Google either didn't answer the question or were gone.
What exactly are you trying to do? I'm not that familiar with Dlookup() but if you describe what you are using it for, then I can probably tell you how to do the same thing in php.
DLookup finds a single piece of data without having to create a recordset, etc.
For instance:
MVariable = DlookUP("Field you are looking for", "Table", "Criteria")
So you can retrieve this data with a single line of code.
It is a VERY handy function.
In PHP/SQL, it takes 5 lines of code (basically creating a query targeted on one field in one record)
I was just trying to see if there was a similar structure in PHP that did the same thing in one line.
No, you would have to create a recordset. I'm sure you could create a function that does it. I could help with that if you wanted so you could do it in a single line of code.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.