In message <[EMAIL PROTECTED]>, Wade Smart
<[EMAIL PROTECTED]> writes
>08172006 0604 GMT-6
>
>Oopps... sorry about that.
>
>Yea, its my own...
> function insert_data($Query) {
> global $HostName, $Database, $UserName, $UserCode;
> $Cnx = connect($HostName, $Database, $UserName, $UserCode);
> if ($Cnx) {
> $Result = mysql_query($Query, $Cnx);
> $Results["RowsAffected"] = mysql_affected_rows($Cnx);
> if ($Results["RowsAffected"]>0) {
> $Results["PrimaryKeyValue"] =
>mysql_insert_id($Cnx);
> }
> mysql_close($Cnx);
> }
> return $Results;
> }
>
>Here is where that is from.... but what I really meant to write was,
>$insert = "INSERT INTO......"
>$result = mysql_query($insert);
>
>wade
Your function seems quite specific, in so far as it opens and closes the
connection after inserting one lot of data. If there is more than one
insert, or any other database work to be done, then it would surely be a
bit of a time waster.
--
Pete Clark
My life in Spain
http://www.hotcosta.com/blog
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/