Search found 6 matches
- Sun Jan 11, 2009 3:53 pm
- Forum: PHP - Code
- Topic: Select Function
- Replies: 11
- Views: 535
Re: Select Function
I'm not sure what happened, but I got it working again. Question. I added the field userGroupName to the original table "users" to try and get a unique field whereby I could select all of the users for a particular group. There are 2 other tables called "groups" and "users_t...
- Sun Jan 11, 2009 2:46 pm
- Forum: PHP - Code
- Topic: Select Function
- Replies: 11
- Views: 535
Re: Select Function
Here is the code I got when I ran it with the echo. SELECT * FROM configurationSELECT * FROM users WHERE login='ca-manager1'SELECT * FROM user_types WHERE id=4SELECT * FROM modules WHERE active = 1 I did realize that the not every row in the field userGroupName had a value so I went into phpMyAdmi...
- Sun Jan 11, 2009 1:59 pm
- Forum: PHP - Code
- Topic: Select Function
- Replies: 11
- Views: 535
Re: Select Function
Thanks, I will look into the sql injection today. I placed the code in the $Where argument as you recommended. $users = eF_getTableData("users", "*", "userGroupName = '".$userGroupName."'"); However, when I logged in with a member of one of the groups a...
- Sun Jan 11, 2009 1:22 pm
- Forum: PHP - Code
- Topic: Select Function
- Replies: 11
- Views: 535
Re: Select Function
And you only need to post your question ONCE ! You are less likely to be helped if you keep re-posting the same question under a different title - just some friendly advice :wink: Advice well taken. Thanks jaoudestudios. After making the original post I started looking around the forum and realized...
- Sun Jan 11, 2009 1:18 pm
- Forum: PHP - Code
- Topic: Select Function
- Replies: 11
- Views: 535
Re: Select Function
Sorry about that. I hope this is enough information. Here is the function I'm working with. function eF_getTableData($table, $fields="*", $where="", $order="", $group="") { global $db; $thisQuery = microtime(true); $sql = "SELECT &qu...
- Sun Jan 11, 2009 12:41 pm
- Forum: PHP - Code
- Topic: Select Function
- Replies: 11
- Views: 535
Select Function
I'm new to PHP and I'm trying to figure out how to use a SELECT option in a function. The function is set up with the following parameters functionName ($table, $fields="*", $where="", $order="", $group="") The current code uses this function and select * from...