Re: mysql and user-defined functions
| From: | Alexander Wagner | Date: | Tue, 22 May 2001 13:13:22 +0000 |
| Subject: | Re: mysql and user-defined functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53852@lists.php.net to get a copy of this message | ||
Lybarger, Denver J (LYBARDJ8) wrote:
> function findEntryId($tableName,$keyName){
> connects to DB
> $db ="SELECT * FROM '$tableName' WHERE '$keyName' =
> $selectOption";
Where does $selectOption come from?
Looks like you simply produced a MySQL-parse-error.
Try var_dump()-ing $db and $temp, this will help you debug your scripts.
> $mysql_result = mysql_query($db);
> $temp = mysql_fetch_array($mysql_result);
> return $temp;
> }
regards
Wagner
--
"Some guy hit my fender, and I told him, 'Be fruitful and multiply,'
but not in those words."
- Woody Allen