Re: how can i get rid of this error ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

#######################
    // Builds the sql insert query
    $fieldlist = ereg_replace(', $', '', $fieldlist);
    $valuelist = ereg_replace(', $', '', $valuelist);
    $query= 'INSERT INTO' . ' (' $query . $fieldlist . ') VALUES (' .
$valuelist . ')';
    $message   = $strInsertedRows . ' ';

//echo $query;

mysql_pconnect($server,$kullanici,$sifre)
or die("sql server baglanamadi");
mysql_select_db($vt)
or die("tabloya baglanamadi");
//echo $query;
$result=mysql_query($query)
or die("Kaydedilemedi1");
echo "kaydedildi..";
$id_no= mysql_insert_id(); //otomatik ID verildi.
print "<p>Veritabani Tanim No: $id_no";
mysql_close();
#########################


here is the concerning line;
about line "mysql_close($sonuc3);"

$sorgu3='SELECT yazaradi from yazarlar';
@mysql_connect($server,$kullanici,$sifre) or die("sql server baglanamadi");
@mysql_select_db($vt) or die("tabloya baglanamadi");
$sonuc3=mysql_query($sorgu3) or die("dosya açilamadi-1");
while ($row3=mysql_fetch_array($sonuc3))
{
if (trim($row[$i])==trim($row3[0]))
echo "<option selected>$row3[0]</option>";
else
echo "<option>$row3[0]</option>";
}
mysql_close($sonuc3);
echo "</select>";
echo "</td>";



----- Original Message ----- 
From: "Jochem Maas" <jochem@xxxxxxxxxxxxx>
To: "Bulent" <bmalik@xxxxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Tuesday, September 27, 2005 12:32 PM
Subject: Re:  how can i get rid of this error ?


> Bulent wrote:
> > Hello
> >
> > I am a novice about that
> > I use mysql4.0.24 with php4.3.10.
> > When I upload  jpeg/gif  files to my webpage I get an error  as below;
> > PHP Warning:  mysql_close(): supplied resource is not a valid MySQL-Link
resource in /var/.....
> > What shall I do ?
>
> look at the line with the error in it.
> then fix the error - which no one here can really help with until
> we see some code.
>
> or from another point of view: what do you want to do?
>
> >
> > My php configuration as below;
> >       GD Support  enabled
> >       GD Version  2.0 or higher
> >       GIF Read Support  enabled
> >       GIF Create Support  enabled
> >       JPG Support  enabled
> >       PNG Support  enabled
> >       WBMP Support  enabled
> >
> >
> > mysql
> >       MySQL Support enabled
> >       Active Persistent Links  0
> >       Active Links  0
> >       Client API version  4.0.24
> >       MYSQL_MODULE_TYPE  external
> >       MYSQL_SOCKET  /tmp/mysql.sock
> >       MYSQL_INCLUDE  -I/usr/local/include/mysql
> >       MYSQL_LIBS  -L/usr/local/lib/mysql -lmysqlclient
> >
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux