You are here: Re: perl extension for PHP - stuck? « PHP Programming Language « IT news, forums, messages
Re: perl extension for PHP - stuck?

Posted by Toby A Inkster on 05/25/07 15:11

billb wrote:

> // in perl this would take these 2 variables and put them in the '?'
> of the sql bit
> $perl->eval('$sth->bind_param(1, $easting)');
> $perl->eval('$sth->bind_param(2, $northing)');

Brute force: before the part above, add:

$perl->eval("\$easting = '$easting'");
$perl->eval("\$northing = '$northing'");

This will create two Perl variables called $easting and $northing and
assign to them the values of the PHP variables of the same name.

However, I'm sure your Perl extension offers a saner way of passing
variables between the languages. Read the documentation thoroughly.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 90 days, 22:53.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/05/25/non-intuitive-surnames/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация