Re: Calling a PostgreSQL function via DBI





Christian,
As an example, I'd do the following:

$arg1 = "$cookieValue" . "::numeric";
...

$result = $dbh->prepare ( "insert into kunden ( kid, nachname, ..., )
values ( ?, ?, ... )" );

$sqls->bind_param(1, $user_nummer);
$sqls->bind_param(2, $nachname);
...

$sqls->execute();
$sqls->finish();

That will take care of your inserting issues. the "bind_param()" function
takes care of the variables and puts them in a 'proper' form.


As for your select statement with the $arg1, ..., $argN, the bind_param()
function will work on those arguments too, I'd just suggest to use the
process of double quoting your string concatenation assignments upfront:

$arg1 = "$someVariable" . "::someText";

Hope this helps.


Hello Lois,
$sqls->bind_param(1, $user_nummer);
$sqls->bind_param(2, $nachname);

What kind of object is this, $sqls? Or is it just another DBI-handler?

Gruss Christian


--
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
.



Relevant Pages

  • Re: I tried to grow a beard
    ... sham of a christian that you are... ... Do you need me to point out for you what Jesus said about lying? ... so you don't care about your little factoid either. ... >>> My identity is available to those who have a right and reason to know ...
    (rec.music.gdead)
  • Re: Michael Moore would be proud...
    ... He's a veteran and has a good HMO (Pacific Care). ... I just don't think you should pay for my bad decisions.. ... Christian," are so lacking in compassion, while I, most definitely *not* ... yet I am much more of a "compassionate Christian" than ...
    (rec.boats)
  • Re: Dont miss Hovind speak at upcoming event!
    ... Upcoming Events ... Our children attended Christian day care. ... they shall take away thy nose and thine ears; ...
    (talk.origins)
  • Re: Dont miss Hovind speak at upcoming event!
    ... Upcoming Events ... Our children attended Christian day care. ... Compare and contrast with Jackson Hole Bible College. ...
    (talk.origins)
  • "Christian" frauds exposed - again.
    ... Bill Moyers did a program where he showed how some christian ... They teach that we should take care of the land and the environment, ... Somehow - though I can't imagine how - these ultra conservatives manage to ... The mixing of right wing republican politics and right wing fanatical ...
    (alt.religion.christian)