After you have inserted the record, use the statement;
$rowid = mysql_insert_id();
$rowid will contain the value inserted by the last insert command.
Janet
- Original Message -
From: "michele" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 17, 2002 3:52 PM
Subject:
Hi All,
I have seen a lot of discussion about this - but no real solutions
:)
I am getting a two task communication error whenever I try to select
a varchar2 element in a query in php4. I seem to be able to select any other
kinds of data without hassle.
All of my environ
Would someone please help? I have looked everywhere and can not find how to
update a database at a certain time.
I am trying to get this to update at midnight instead of every time the
browser refreshes. My hosting service has cron jobs
but I don't understand how to set them up. Is there a way to
Hi All,
I have seen a lot of discussion about this - but no real solutions
:)
I am getting a two task communication error whenever I try to select
a varchar2 element in a query in php4. I seem to be able to select any other
kinds of data without hassle.
All of my environ
> I have a table with a ID field 'auto_increment',
> when i insert a record in the table,
> how can i know the value of the ID inserted by the mySQL?
mysql_insert_id()
http://www.php.net/manual/en/function.mysql-insert-id.php
-
are you always "refreshing" the session on each page dave?
i am pretty sure you need to call session_start() on every page that you
will be accessing the session-based variables.
HTH
beau
// -Original Message-
// From: Dave Carrera [mailto:[EMAIL PROTECTED]]
// Sent: Saturday, 16 Febru
The manual is at http://www.php.net/manual/en
The function you need is mysql_insert_id.
On Mon, 18 Feb 2002, michele wrote:
> I have a table with a ID field 'auto_increment',
> when i insert a record in the table,
> how can i know the value of the ID inserted by the mySQL?
> Thank's,
> Mich
I have a table with a ID field 'auto_increment',
when i insert a record in the table,
how can i know the value of the ID inserted by the mySQL?
Thank's,
Michele.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I don't get it... I have PHP 4.1.0 because 4.1.1 pukes all over the
lace( I am assuming this is the case as well...) on Win2k Server with Apache
1.3.xx.
And I get this from this query:
Warning: Undefined index: Sec_phone in c:\apache
group\apache\htdocs\recruiter\show_can.php on line 40
QUERY:
> I want to know if there is a way in PHP to sence that the visitor left the
> site, I think the answer is in PHP-Sessions, but I don't know how, Any
help
> please??
Use cookies.
http://www.php.net/manual/en/features.cookies.php
--
Hi,
I want to know if there is a way in PHP to sence that the visitor left the
site, I think the answer is in PHP-Sessions, but I don't know how, Any help
please??
Best Regards
Hayan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Jon, and Howard,
(comments interposed, below)
> Try using something like
> $getlist = mysql_query("SELECT id FROM yourdb",$dbconnectetc);
> $numrows = mysql_num_rows($getlist);
> echo "$numrows\n";
>
> This will give you the number of records in your db.
> If you use autoincrement for the id f
Hi Jon
Try using something like
$getlist = mysql_query("SELECT id FROM yourdb",$dbconnectetc);
$numrows = mysql_num_rows($getlist);
echo "$numrows\n";
This will give you the number of records in your db.
If you use autoincrement for the id field your will not have to
worry about your ++.
If
13 matches
Mail list logo