Re: mysql_free_result return ::newbie
| From: | David Robley | Date: | Fri, 15 Sep 2000 01:17:06 +0000 |
| Subject: | Re: mysql_free_result return ::newbie | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16878@lists.php.net to get a copy of this message | ||
On Fri, 15 Sep 2000, Tom Beidler wrote:
> This email has two questions.
>
> For starters, I have a bloated form I'm trying to post. Something like 70
> fields of information. I thought it would be best to break everything down
> into smaller tables. The page I setup sends an email and then "inserts" the
> information into one of five tables. I wanted to use the same format to
> insert, ie.
>
> $query = "INSERT INTO est_job (contact, ...
> VALUES ('$contact', '$company'...
> $result = mysql_query ($query)
>
> Once I insert one tables info I would like to use the exact same variables
> and format for the next table so I'm assuming I need to execute
> mysql_free_result before using $result again. Is this true? Am I making
> sense?
No, and sort of :-) mysql_free_result frees the memory associated with a
mysql query result, which would normally be all the data that a SELECT
query returns. In your case, there is effectively no data returned.
> The second question is I'm getting the following warning from my
> mysql_free_result.
>
> Warning: 1 is not a MySQL result index in estimate/estimate.php3 on line 195
>
> My code is: mysql_free_result ($result);
>
>
> Any help would be appreciated. I'm new to this stuff but I luvs it!
This is probably because you are trying to free the non-existent result of
an INSERT or DELETE query.
Now I'll wait for someone who knows this stuff better to elaborate and
correct my answer ;-)
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA