Re: Stupid newbie looping MySQL question
| From: | Lynn Siprelle | Date: | Mon, 08 Jan 2001 06:53:46 +0000 |
| Subject: | Re: Stupid newbie looping MySQL question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-5693@lists.php.net to get a copy of this message | ||
At 4:59 PM -0800 1/7/01, Rasmus Lerdorf wrote:
>Ok, do the following:
>
> - Assign your query to a variable
>
> $query = "select topic from table";
>
> - Output that variable
>
> echo $query
>
> - Perform the query
>
> $result = mysql_db_query('name of db', $query);
> if(!$result) echo mysql_error();
>
>Then send me the output of this. This has to be a problem with the query
>you are sending to MySQL.
Per your instructions, after linking to the db I put in:
$query = "SELECT name FROM forums";
echo $query;
$result = mysql_db_query ("tnh", $query);
if(!$result) echo mysql_error();
and the result, cut and pasted from the web page, was:
SELECT name FROM forums
No error message.
L
--
Lynn Siprelle, Siprelle & Associates: Web Construction and Publishing
Chief Assoc. Josephine b. 9/9/97 * New Assoc. Louisa due 5/1/01
Business: lynn@siprelle com | Personal: lynsa@siprelle.com
The New Homemaker: http://www.newhomemaker.com/