For one thing, your column name Long is invalid. It's a reserved keyword in
MySQL. Either enclose it in backticks or change the name of the column.
If you want to see what the db is reporting, do this:
$result = mysql_query($query)
or die(mysql_error())
And see what the database tells you.
> -Original Message-
> From: Piet from South Africa [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 01, 2004 11:48 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] my code
>
>
> This is my code
>
> My function call:
>
> insert_property($name, $upfile1, $upfile2, $upfile3,
> $upfile4, $bed, $bath,
>
> $living, $dining, $reception, $garages, $flats, $servant,
> $pool, $jacuzzi,
> $lapa,
>
> $entertain, $security, $securest, $short, $long, $contact,
> $number, $mail,
> $fax,
>
> $period, $prov, $city, $area);
>
> My function:
>
> function insert_property($name, $upfile1, $upfile2, $upfile3,
> $upfile4,
> $bed, $bath,
>
> $living, $dining, $reception, $garages, $flats, $servant,
> $pool, $jacuzzi,
> $lapa,
>
> $entertain, $security, $securest, $short, $long, $contact,
> $number, $mail,
> $fax,
>
> $period, $prov, $city, $area)
>
> {
>
> global $link;
>
>
> $query = "insert into property (name, photo1, photo2, photo3,
> logo, bed,
> bath,
>
> living, dining, reception, garages, flats, servant, pool,
> jacuzzi, lapa,
>
> entertain, security, securest, short, long, contact, number,
> mail, fax,
>
> period, prov, city, area)
>
> values ('" . $name . "', '" . $upfile1 . "', '" . $upfile2 . "', '" .
> $upfile3 . "'
>
> ,'" . $upfile4 . "', '" . $bed . "', '" . $bath . "', '" .
> $living . "'
>
> ,'" . $dining . "', '" . $reception . "', '" . $garages . "',
> '" . $flats .
> "'
>
> , '" . $servant . "', '" . $pool . "', '" . $jacuzzi . "', '"
> . $lapa . "'
>
> , '" . $entertain . "', '" . $security . "', '" . $securest . "', '" .
> $short . "'
>
> , '" . $long . "', '" . $contact . "', '" . $number . "', '"
> . $mail . "'
>
> , '" . $fax . "', '" . $period . "', '" . $prov . "', '" . $city . "'
>
> , '" . $area . "')";
>
>
> $result = mysql_query($query);
>
> if (!$result)
>
> {
>
> echo "no result";
>
> }
>
> else
>
> {
>
> echo "";
>
>
> }
>
> }
>
>
> "Piet From South Africa" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi
> >
> > I want to know if there is a limit to the amount of columns
> that can be
> > created in a table, i have 30 columns, and i cannot insert
> data, i have
> > checked everything over and over again, even written a
> shorter insert
> > function that worked on the database.
> >
> > Can anyone help me here!
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php