Re: [PHP-DB] how to find

2004-11-11 Thread -{ Rene Brehmer }-
1. learn the basics of arrays 2. RTFM At 12:27 11-11-2004, peppe wrote: Hi , I have numbers in my array 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 or 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 or 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 how can I find the first 1 and the last is there a function for it -- PHP Database Mailing List

Re: [PHP-DB] how to find

2004-11-11 Thread peppe
I really don't understand why people like you respond on questions do you want to make yourself interesting . I'm new to php and I'm trying to learn something that's why I mail in newsgroup but please please do not insult and do not respond any more if you think people are asking stupid questions

[PHP-DB] how to find

2004-11-11 Thread peppe
Hi , I have numbers in my array 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 or 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 or 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 how can I find the first 1 and the last is there a function for it Regards -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP-DB] how to find

2004-11-11 Thread Norland, Martin
, 2004 6:17 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] how to find I really don't understand why people like you respond on questions do you want to make yourself interesting . I'm new to php and I'm trying to learn something that's why I mail in newsgroup but please please do not insult and do

RE: [PHP-DB] how to find

2004-11-11 Thread dpgirago
Martin, Thanks for your kind words to the new guy. I really don't understand why others don't simply refrain from responding rather than burn bandwidth with their rants of RTFM or or Off Topic - go somewhere else. I really appreciate all the posts folks make as I tend to learn something, even

[PHP-DB] How to find the last ID?

2003-06-06 Thread Chris Payne
Hi there everyone, I'm creating a new entry using the following: mysql_query (INSERT INTO agents (agent_name) VALUES ('$agentname') but I need to find out the ID value it created, how can I do this easily? Thanks Chris

Re: [PHP-DB] How to find the last ID?

2003-06-06 Thread . ma
hi you can easily do this by using mysql_insert_id(); see http://www.php.net/manual/en/function.mysql-insert-id.php .ma e: [EMAIL PROTECTED] w: http://www.abendstille.at /***/ life would be easier if i knew the source code. Am Freitag, 06.06.03 um 23:16 Uhr schrieb Chris Payne: Hi

Re: [PHP-DB] How to find the last ID?

2003-06-06 Thread Chris Payne
Hi there, Thanks for your quick reply, very appreciated :-) Chris hi you can easily do this by using mysql_insert_id(); see http://www.php.net/manual/en/function.mysql-insert-id.php .ma e: [EMAIL PROTECTED] w: http://www.abendstille.at /***/ life would be easier

Re: [PHP-DB] How to find the last ID?

2003-06-06 Thread Jeff Shapiro
$last_id = mysql_insert_id(); Check out this page for details. http://www.php.net/manual/en/function.mysql-insert-id.php On Fri, 6 Jun 2003 17:16:01 -0400, Chris Payne wrote: Hi there everyone, I'm creating a new entry using the following: mysql_query (INSERT INTO agents (agent_name)

[PHP-DB] How to find the autoincremented number?

2003-02-21 Thread David Chamberlin
Hey, Most of the tables I use identify things using an id which is auto-generated using autoincrement. However I can't seem to figure out a good way to find what value was generated for the ID. For example, let's say I generate a new entry and want to e-mail out a link to it and the link

Re: [PHP-DB] How to find the autoincremented number?

2003-02-21 Thread Leif K-Brooks
http://www.php.net/manual/en/function.mysql-insert-id.php David Chamberlin wrote: Hey, Most of the tables I use identify things using an id which is auto-generated using autoincrement. However I can't seem to figure out a good way to find what value was generated for the ID. For example,

Re: [PHP-DB] How to find the autoincremented number?

2003-02-21 Thread David Chamberlin
Aha. I had seen that before, but disregarded it because I was trying to just use pearDB calls instead of the mysql calls. However what I noticed this time when looking through there is that there's a LAST_INSERT_ID() that I could use in a query. e.g., function addNewEntry( $stuffToPutIn ){

RE: [PHP-DB] How to find out the number of rows in a table?

2002-01-24 Thread Rick Emery
SELECT count(*) AS ctr FROM mytable; -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 10:36 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to find out the number of rows in a table? Hi there, I am trying to find out the number of rows

RE: [PHP-DB] How to find out the number of rows in a table?

2002-01-24 Thread Sam Masiello
Try the following: $sql = select count(*) as c from your_table ; $result = mysql_query(your_db, $sql, your_connection_identifier) ; $row_count = mysql_result($result, 0, 'c') ; Now $row_count contains the number of rows in your table named your_table HTH --Sam Masiello Andy [EMAIL