[PHP-DB] Re: [PHP-WIN] Re: Error while inserting data into mysql

2011-03-01 Thread Richard Quadling
On 1 March 2011 10:59, nagendra prasad nagendra802...@gmail.com wrote:
 Hi All,

 I have attached the table structure and the PHP code.

 Best,
 Guru.

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


Thank you for that.

Can you tell me what column in the table is scloth100_qty? I can't find it.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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



[PHP-DB] Re: [PHP-WIN] Re: Error while inserting data into mysql

2011-03-01 Thread Richard Quadling
On 1 March 2011 10:59, nagendra prasad nagendra802...@gmail.com wrote:
 Hi All,

 I have attached the table structure and the PHP code.

 Best,
 Guru.

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


The scloth100 columns I can see are ...

|scloth100_totamt|int(20)|Yes|NULL
|scloth100_utp|int(20)|Yes|NULL
|scloth100_val|int(20)|Yes|NULL
|scloth100_vatp|int(20)|Yes|NULL
|scloth100_vatr|int(10)|Yes|NULL
|scloth100|varchar(100)|Yes|NULL

No scloth100_qty.


-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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



Re: [PHP-DB] Re: [PHP-WIN] Re: Error while inserting data into mysql

2011-03-01 Thread Geoff Lane
On Tuesday, March 1, 2011, Richard Quadling wrote;

 Can you tell me what column in the table is scloth100_qty? I can't find it.

The issue here is probably that you have some PHP code that is passing
a SELECT statement to MySQL and that SELECT includes scloth100_qty in
its column list. One debugging technique that I find useful in such
situations is to echo the query to the output web page. So, if your
original code was:

  $result_table = mysql_query ($query, $link);

Then you might try inserting the line:

  echo p$query/p;

immediately before the call to mysql_query, i.e.:

  echo p$query/p;
  $result_table = mysql_query ($query, $link);

You can then examine the actual query being passed to MySQL and work
backwards from there to correct the issue.

HTH,

-- 
Geoff


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



Re: [PHP-DB] Re: [PHP-WIN] Re: Error while inserting data into mysql

2011-03-01 Thread nagendra prasad
Thanks Geoff Lane, I saw my mistake. Their was no scloth100_qty in my mysql
table. Once again Thanks buddy :)


On Tue, Mar 1, 2011 at 4:53 PM, Geoff Lane ge...@gjctech.co.uk wrote:

 On Tuesday, March 1, 2011, Richard Quadling wrote;

  Can you tell me what column in the table is scloth100_qty? I can't find
 it.

 The issue here is probably that you have some PHP code that is passing
 a SELECT statement to MySQL and that SELECT includes scloth100_qty in
 its column list. One debugging technique that I find useful in such
 situations is to echo the query to the output web page. So, if your
 original code was:

  $result_table = mysql_query ($query, $link);

 Then you might try inserting the line:

  echo p$query/p;

 immediately before the call to mysql_query, i.e.:

  echo p$query/p;
  $result_table = mysql_query ($query, $link);

 You can then examine the actual query being passed to MySQL and work
 backwards from there to correct the issue.

 HTH,

 --
 Geoff


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