Hi guys. This may seem kind of noobish, but here goes.
I'm trying to write a function that, when passed a single variable that corresponds to a row in a database, I want it to output the contents from a different field in the same row.
Say I have a table set up like this:
========================
ID | theName | Content |
1 | Example | examples content |
I want the function to look like this:
function getData($name) {
//code here
}
If the variable sent to the function was Example, I want it to find the row whos name is Example and return the Content from that same row. Does that make sense?