Hi Luis.

It sounds like your script may not be initialising those 
two variables correctly.

Are the variables being set properly in your script before 
sending the insert query to mysql?

MySQL will quite happily insert an empty string value, '' 
into a char field without generating an error message.

Try echoing the content of the two variables that are not 
being set in mysql to screen, just before you send the query 
to mysql.

Does that shed any light on the problem?

Keith

In theory, theory and practice are the same;
in practice they are not.

On Thu, 27 Apr 2006, luis perez wrote:

> To: mysql@lists.mysql.com
> From: luis perez <[EMAIL PROTECTED]>
> Subject: Update not working in a script,
>     but going fine running with MySQL Browser
> 
> Hi guys.
> Got a problem when adding records to an existing table, as part of a sql
> script.
> There are  a couple of fields that don't get added as they should
> (respaccstopframe and acstpradiusid).
> This is the update command:
> 
> insert into temp_s1 (accsesid, respaccstopframe, acstpradiusid, sgsnip,
> sgsnip_subnet, sgsnip_last, ggsnip, subip, startime, stoptime)
> select r1.radius_acct_session_id, t.frame_number, r1.radius_id,
> r1.radius_XXX_Address, substring_index(r1.radius_XXX_Address,".",3),
> substring_index(r1.radius_XXX_Address,".",-1),r1.radius_NAS_IP_Address,
> r1.radius_Framed_IP_Address, f.frame_time, r1.frame_time
> from radius r1, temp_respaccstopframe t, frame f
> where r1.frame_number = t.r1_fn and f.frame_number= t.syntstart_number and
> t.noacstart=1 and t.started_in >=0;
> 
> I didn't received any error, but fields were not added. I added an update
> command for those two fields just right after in the script.
> 
> # no preguntes por que lo hago dos veces...los duendes del sw...
> update temp_s1 s1, temp_respaccstopframe t
> set s1.respaccstopframe= t.frame_number, s1.acstpradiusid=t.radius_id
> where s1.accsesid=t.radius_acct_session_id and
> s1.ggsnip=t.radius_NAS_IP_Address and t.noacstart=1 and t.started_in >=0;
> 
> Same result.
> Then I run the update from MyQSL Browser and then worked fine...!!?
> 
> I've run same script and update command thru Browser with same table in
> both MySQLv4.1 and v5.0. No change.
> 
> I know it sounds crazy, but can anyone add some light on this?
> 
> TIA.
> Luis.
> 
> _________________________________________________________________
> ¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras
> en MSN Motor. http://motor.msn.es/researchcentre/
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 
-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to