Subject RE: **SPAM** RE: [firebird-php] auto increment last insert
Author Johan van Zyl
Hi
Thx for the help.
See comments below.
-----Original Message-----
From: Darren Thompson [mailto:h02@...]
Sent: 24 November 2004 20:07
To: firebird-php@yahoogroups.com
Subject: **SPAM** RE: [firebird-php] auto increment last insert


I think you is not pretending but i think you should read the php manual.
For a newbie who only requires limited functionality from PHP, at this
stage, to "read the manual" is a bit much.
Of course I consult the manual, but being VERY new, I am still very lost.
Clarion yeah i know a little never thought it was still being used.
More than ever. http://www.softvelocity.com http://www.capesoft.com
http://www.clarionmag.com http://www.icetips.com etc.

looking at your prob your code is messy
Was using sample code from PHPFreaks, but I may also have messed it up a
bit<g>

Function GetId() {
$qry = 'SELECT gen_id('GEN_USERS',1) AS Id from RDB$DATABASE';
$res = ibase_query($qry);
while ($resrow = ibase_fetch_row($res)) {
$id = $resrow[0];
}
return($id);
}


//use
$variable = GetId();

use this function to get a gen id

Thx! Will try this out !
Greetings
JVZ

-----Original Message-----
From: Johan van Zyl [mailto:johan@...]
Sent: 24 November 2004 19:48
To: firebird-php@yahoogroups.com
Subject: RE: [firebird-php] auto increment last insert


Hi
Yes, I am really struggling.
Do you think I pretend?
And what is so funny about Clarion - do you know anything about it?
Cheers
-----Original Message-----
From: Darren Thompson [mailto:h02@...]
Sent: 24 November 2004 19:27
To: firebird-php@yahoogroups.com
Subject: **SPAM** RE: **SPAM** Re: [firebird-php] auto increment last
insert


Clarion lmfao the php manual is awesome it tells you all you need to
know
;-) if you really struggle i am sure people will help you here
-----Original Message-----
From: Johan van Zyl [mailto:johan@...]
Sent: 24 November 2004 18:17
To: firebird-php@yahoogroups.com
Subject: RE: **SPAM** Re: [firebird-php] auto increment last insert


If I may add - I am a full time professional programmer - USING
Clarion
!
That is where I spent 18 hours a day 7 days a week.
But a need has arisen to to be able read the contents of Firebird
databases
via the web - so I started of with ColdFusion - and I was very
impressed -
but then I saw the price - then I investigated BlueDragon - but the
free
version will not work with Firebird on Linux - so now I am here -
investigating PHP.
I am amazed that I am finding any time to spend on PHP at all!
So I need all the help I can get. Just hoping that the natives are
friendly!
Greetings

-----Original Message-----
From: Johan van Zyl [mailto:johan@...]
Sent: 24 November 2004 18:07
To: firebird-php@yahoogroups.com
Subject: RE: **SPAM** Re: [firebird-php] auto increment last
insert


I am NOT using PHP 5, so I do not know what is or isn't in its
manual.

ibase_gen_id was suggested to be used to solve my problem.

I was not to know that it is PHP 5 only.

If I knew everything then I would not need [firebird-php].
If I first had to read ALL relevant manuals from cover to cover I
would
not
have time to earn a living.
Over at the Clarion NG's they are a lot more charitable.
Who may or may not post here, then?
For a newbie I did a bit of allright by taking mysql/php sample
code
and
getting it to work with Firebird.
And with the help of [firebird-php]
If I irritate you then just ignore me - but I DO NOT need to get
"RTFM"
as
advise.
I would rather give up PHP!
Greetings
JVZ


-----Original Message-----
From: Michal Žeravík [mailto:michalz@...]
Sent: 24 November 2004 17:01
To: firebird-php@yahoogroups.com
Subject: **SPAM** Re: [firebird-php] auto increment last insert



Of course not, but the manual header says:
ibase_gen_id
(PHP 5)
ibase_gen_id -- Increments the named generator and returns its
new
value

I'm FB newbie as well, but It's good to see manual before flood
mailinglist I think.

Michal


Johan van Zyl wrote:

>If the answer to everything is RTFM then we may as well close
[firebird-php]
>down!
>Greetings
>
>-----Original Message-----
>From: Michal Žeravík [######*michalz@...]
>Sent: 24 November 2004 12:58
>To: firebird-php@yahoogroups.com
>Subject: Re: Re: [firebird-php] auto increment last insert
>
>
>
>ibase_gen_id is for php5.,
>rtfm
>
>michal
>
>
>Johan van Zyl wrote:
>
>
>
>>Thx - but
>>$userid = ibase_gen_id ('GEN_USERS',1,$dbh);
>>gives me
>>Fatal error: Call to undefined function: ibase_gen_id() in
>>/home/e-smith/files/ibays/Primary/html/mc/register.php on line
116
>>
>>what is $dbh?
>>Greetings
>> -----Original Message-----
>> From: Yves Glodt [######*yglodt@...]
>> Sent: 24 November 2004 12:23
>> To: firebird-php@yahoogroups.com
>> Subject: **SPAM** Re: [firebird-php] auto increment last insert
>>
>>
>>
>> <snip>
>> > [Alan McDonald] Firefox os the browser, Firebird is the RDBMS
>> >
>> > This is how I get a new value
>> > $newcontactid = $db->get_var("SELECT
GEN_ID(GEN_CONTACT,1)
FROM
>> > RDB\$DATABASE");
>>
>> In general, since PHP5, instead of "SELECT GEN_ID(..." you can
also
>> use the function
>>
>> int ibase_gen_id ( string generator [, int increment [,
resource
>> link_identifier]])
>>
>> e.g.: $newcontactid = ibase_gen_id ('GEN_CONTACT',1,$dbh);
>>
>> See here:
>> ####***lu2.php.net/ibase_gen_id
>>
>> Best regards,
>> Yves
>>
>> > Then you use it to insert your new record
>> > Alan
>> >
>> >
>> > [Non-text portions of this message have been removed]
>> >
>> >
>> >
>> >
>> >
>> > Yahoo! Groups Links
>> >
>> >
>> >
>>
>>
>>
>>
>> Yahoo! Groups Sponsor
>> ADVERTISEMENT
>>
>>
>>
>>
>>





>>--------------------------------------------------------------------------
-
>>
>>
>-
>
>
>>--
>> Yahoo! Groups Links
>>
>> a.. To visit your group on the web, go to:
>> ####***groups.yahoo.com/group/firebird-php/
>>
>> b.. To unsubscribe from this group, send an email to:
>> firebird-php-unsubscribe@yahoogroups.com
>>
>> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms
of
>>
>>
>Service.
>
>
>>---
>>Outgoing mail is certified Virus Free.
>>Checked by AVG anti-virus system (####***www.grisoft.com).
>>Version: 6.0.799 / Virus Database: 543 - Release Date:
2004/11/19
>>
>>
>>[Non-text portions of this message have been removed]
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (####***www.grisoft.com).
>Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (####***www.grisoft.com).
>Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>



[Non-text portions of this message have been removed]





Yahoo! Groups Links








---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (####***www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19


Yahoo! Groups Sponsor
ADVERTISEMENT





--------------------------------------------------------------------
--
--
--
--
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/

b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19


[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT





----------------------------------------------------------------------
--
--
--
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/

b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.



[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT





------------------------------------------------------------------------
--
--
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/

b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19


[Non-text portions of this message have been removed]


Yahoo! Groups Sponsor
ADVERTISEMENT





--------------------------------------------------------------------------
--
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/

b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.



[Non-text portions of this message have been removed]



Yahoo! Groups Sponsor
ADVERTISEMENT





----------------------------------------------------------------------------
--
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-php/

b.. To unsubscribe from this group, send an email to:
firebird-php-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19


[Non-text portions of this message have been removed]