Re: [PHP] Re: MySQL empty row

2005-04-05 Thread GamblerZG
DB Error: constraint violation
What DB do you use?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: MySQL empty row

2005-04-04 Thread GamblerZG
Please replace die($res-getMessage()) with 
user_error($res-getMessage(), E_USER_ERROR) and then post the output.

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


Re: [PHP] Re: MySQL empty row

2005-04-04 Thread Neo Theone
GamblerZG wrote:
Please replace die($res-getMessage()) with 
user_error($res-getMessage(), E_USER_ERROR) and then post the output.

If I uncomment this it seems to work. Not error or anything in the code.
Truely don't know what the error is.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: MySQL empty row

2005-04-04 Thread Satyam
You might have changed inadvertently one of the include files.  It might 
have trailing blanks after the final ?, which obviously you don't see, 
being blank, but they are echoed to the browser, and the header('location 
... then gives an error.  Might have nothing to do with the SQl instructions

Satyam

Neo Theone [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Until some time I could make a new empty line in mysql with this query:
 INSERT INTO `.$_SESSION['type'].`() VALUES ()
 where $_SESSION['type'] was the table I wanted to use but now I get an 
 error and since I use DB I just get this error

 INSERT INTO `authors`() VALUES ()
 *Warning*: Cannot modify header information - headers already sent by 
 (output started at 
 /usr/local/ftp/faps/public_html/pubDB/edit/newline.php:9) in 
 */usr/local/ftp/faps/public_html/pubDB/edit/newline.php* on line *19

 *This is the file
 ?php
include ./checkuser.php;

include ../modules/connect.php;
   array_pop($_REQUEST);
$query = INSERT INTO `.$_SESSION['type'].`() VALUES ();
   $res = $db-query($query);
//Always check that result is not an error
if (DB::isError($res)) {
die($res-getMessage());
}

include ../modules/disconnect.php;
   header (Location: ./edit.php?.$_SESSION['stayurl']);

 ?
 Howcome does line nine: $res = $db-query($query); write anything?? 

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



Re: [PHP] Re: MySQL empty row

2005-04-04 Thread Neo Theone
GamblerZG wrote:
Please replace die($res-getMessage()) with 
user_error($res-getMessage(), E_USER_ERROR) and then post the output.

on one table it still does not work:
this is the error:
DB Error: constraint violation
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php