1
votes

I use Symfony 1.4 and I would like to query a value of a variable that is defined on the MySQL server and now it unfortunately can not be otherwise (it is a dynamically assigned IP, which changes daily through external API). The corresponding VIEW on a MySQL server containing this variable is working but if I wanted to send different address through SET @IP = '123.456.789.012' for testing purposes, it will be saved on the MySQL server, but when I'm trying the same in Symfony in the code/component class/template just before the $pager->GetResults():

$connection = Propel::getConnection();

$query = "SET @IP='123.456.789.012'";

$statement = $connection->prepare($query);

$statement->execute();

the results of the sfPager show the old address still... but I need to change it during Symfony runtime to verify the credentials ... I think that the sfPager session uses its own connection session to connect to the database and my SETs there are simply not reflected ... or am I wrong ?

Thanks a lot in advance

Jan

1

1 Answers

0
votes

You can try by deleting contents of cache folder