CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Use of a query value in CC

Print topic Send  topic

Author Message
Xavier
Posted: 07/16/2002, 8:48 AM

Hello,
let's suppose I have something like

$db->query("SELECT sequence_table_name.last_value");

in a record form events (I use PostgreSQL with php 4).
I want to know how to properly use the result (save it in a variable, test
it and so on).
Thanks.


Alexey Alexapolsky
Posted: 07/16/2002, 8:54 AM


'execute a query
$db->query("SELECT sequence_table_name.last_value");


' make sure if there are any records and move record pointer to the 1st
record

if ($db->next_record())

{

$some_var = $db->f(0); 'obtain 1st field
$some_var2 = $db->f(1); 'obtain 2nd field

}




--

Alex,
Support Engineer
CodeCharge Team



"Xavier" <nobody@nowhere.invalid> wrote in message
news:ah1f8u$7qv$1@news.codecharge.com...
> Hello,
> let's suppose I have something like
>
> $db->query("SELECT sequence_table_name.last_value");
>
> in a record form events (I use PostgreSQL with php 4).
> I want to know how to properly use the result (save it in a variable, test
> it and so on).
> Thanks.
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.