RE: [PHP-DB] simple database question

2001-07-26 Thread Hoover, Josh

Hi Brian,

Are you using MySQL?  If so, you can use the function mysql_insert_id().

http://www.php.net/manual/en/function.mysql-insert-id.php

That will give you the last id inserted by MySQL which you can use in the
address table.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 -Original Message-
 From: Brian Weisenthal [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, July 26, 2001 9:53 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] simple database question
 
 
 ok this should be an easy one, i am just blanking on it here.
 
 i want to link two tables together, a user table and address 
 table. i create
 the user entry first, then create the address entry. after 
 creating the
 address entry how do i get the auto_id that was entered in to 
 enter it into
 the user table? there is no unique field in the address 
 table. any ideas?
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 



RE: [PHP-DB] simple database question

2001-07-26 Thread Hoover, Josh

OK, you're using SQL Server, right?  Try executing this statement after you
insert the user and before you try inserting the address record:

select @@identity

That should give you the last inserted id, assuming it's an identity column.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 


-Original Message-
From: Brian Weisenthal [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 15:08
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: simple database question


oh, using ms sql



RE: [PHP-DB] Converting MS Access to MySQL

2001-07-19 Thread Hoover, Josh

You can use ODBC to go from Access to MySQL.  Get the MyODBC driver for
Windows and setup your datasource so you can get to it via Access.  You can
do a direct export from Access to the MySQL database that way.  There may be
some differences, but I'm not sure of what all of them would be.

Hope that helps some.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

  Can anyone suggest a good utility for converting database 
 from MS Access
 to MySQL?
  Thanks.



RE: [PHP-DB] Url link

2001-05-14 Thread Hoover, Josh

$REMOTE_ADDR is what you're looking for.  To find out all these sort of
variables PHP makes available to you, do a ?php phpinfo(); ? page and then
look at the section titled: Apache Environment.

Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 Anyone know how to get the connecting client's ip address 
 using php?  I need
 to log this information to a db for security reasons



RE: [PHP-DB] PHP how to compare?

2001-03-14 Thread Hoover, Josh

I'm assuming these are strings you are comparing, correct?  If so, try this:

if(strcmp($PASS, $PASSNOG))
{
echo "password doesn't match! $back";
exit;
}

http://www.php.net/manual/en/function.strcmp.php


Josh Hoover
KnowledgeStorm, Inc.
[EMAIL PROTECTED]

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 

 Can somebody tell me what the proper statement is for this? I want two
 variables to match with eachother but this doesn't seems to work. Help
 please? THNX
 
if ($PASS != $PASSNOG) {
   echo "password doesn't match! $back";
   exit;
   }
 
 Duky



RE: [PHP-DB] parsing parameter over page

2001-03-06 Thread Hoover, Josh

Try this URL from the PHP manual:

http://www.php.net/manual/en/function.serialize.php

You could use serialize($a) on your a.php page and then to use that object,
you would do unserialize($b).  I think that's what you want to do.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here 


 i confuse about parsing paramater over php pages
 the paramater that i try to parse was a class variable.
 so if i defined
$a = new myclass;
 in a.php. can i use that variable class in my b.php.
 is it possible for me to do that ?



RE: [PHP-DB] Re: sessions

2001-02-23 Thread Hoover, Josh

Configure PHP with this line included --enable-trans-sid  This will
automatically put the session ID after every URL if the user does not have
cookies enabled.

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here


 This could be because cookies have been disabled. Can I 
 find a way such
 that my code works even if cookies have been disabled ??
 



RE: [PHP-DB] SQL finding a date problem

2001-02-23 Thread Hoover, Josh

Try this:

SELECT * from schedule WHERE EST_DATE = '2001-03-26';

By the way, what Database are you using?

Josh Hoover
KnowledgeStorm, Inc.

Searching for a new IT solution for your company? Need to improve your
product marketing? 
Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify
the process for you.
KnowledgeStorm - Your IT Search Starts Here


 Can someone tell me how to search for a date with SQL? I have 
 tried the
 following
 
 SELECT * from schedule WHERE EST_DATE = '03/26/2001';
 
 I get the error
 Incompatible datatypes in expression : = , SQL state 37000
 
 Thanks.