cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Delis, Christopher E." <cede...@uillinois.edu>
Subject RE: ???ESQL update table???
Date Mon, 17 Mar 2003 15:48:54 GMT
on a slightly different note, is there "place-holder" functionality in esql
stylesheet language?  e.g.,

insert into atable (field1, field2) values (?, ?)
select * from atable where field1 = ? limit ?
...

TIA, 
chris


> -----Original Message-----
> From: Maxime.Gheysen@swisscom.com [mailto:Maxime.Gheysen@swisscom.com]
> Sent: Friday, March 14, 2003 9:20 AM
> To: cocoon-users@xml.apache.org
> Subject: ???ESQL update table???
> 
> 
> Hi,
> This is a part of a query. My problem is that when I make a 
> SELECT right
> after an INSERT I don't get the last updated query :
> 
> ---------------------------
> <esql:execute-query>
>  <esql:query>
>   INSERT INTO Actions  (at_name, at_order)
>   VALUES ('<esql:get-string column="at_name" ancestor="1"/>',
> <xsp:expr>nouvOrder</xsp:expr>)
>  </esql:query>	
>  <esql:update-results/> 	 
> </esql:execute-query>	 
> 
> <esql:execute-query>
>  <esql:query>
>   SELECT TOP <xsp:expr>myTopCnt</xsp:expr> * FROM Actions
>   WHERE at_order = <xsp:expr>myOrderID</xsp:expr>
>   ORDER BY at_id DESC 
>  </esql:query>	
>  <esql:results>
>  <esql:row-results>	
>   <xsp:logic>
>     nouvActionName = <esql:get-string column="at_name"/>;
>   </xsp:logic>  
>  </esql:row-results>
>  </esql:results>	 
> </esql:execute-query>	 
> 
> <esql:execute-query>
>  <esql:query>
>   SELECT TOP 1 * FROM Actions
>   WHERE at_name = '<xsp:expr>nouvActionName</xsp:expr>'
>   ORDER BY at_id DESC                          
>  </esql:query> 
>  <esql:results>
>  <esql:row-results>    
>    <xsp:logic>
>     nouvAction = <esql:get-int column="at_order"/>;
>    </xsp:logic> 
>   </esql:row-results>
>  </esql:results>        
> </esql:execute-query>   
> -------------------------------
> What I mean is that in the last "execute-query" the value 
> "<esql:get-int
> column="at_order"/>" returns a value, but in my SQL Profiler I get a
> query witch returns another value (the right)!!!!
> I think that it is due to the refreshing from the insert, because the
> insert value is queried!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message