[PHP-DB] Make history HOW?

2001-04-19 Thread Aleksey Yarilovets

Hi everyone !

The question is:

how to build a script that displays history of user clicks like:

Home  Setting  User Properties

BUT you can go into UserProperties from other locations so somewhere it will
be OK to get

Search  User Results  User Properties

Does enybody done it?

PS: www.geocities.com does but how? That is the question

Thanks, Alexey
--
--
LEA*D IP Systems
Phone: +972 4 999 1212 (ext. 213)
Fax: +972 4 999 1213
Mobile: +972 58 774 369
Email: [EMAIL PROTECTED]




-- 
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] Error Msg: Wrong data type when performing extract()

2001-04-19 Thread Shahmat Dahlan

You're right, no row was returned by the query when i did tried to fetch it. So
I suppose the next viable thing to do is to figure what went wrong with the
query.

Thanks


CC Zona wrote:

 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] ("Shahmat Dahlan") wrote:

  $result=mysql_query($sqlstmt);
  # print $result;
  $row=mysql_fetch_array($result)
 
  extract($row);
 
  If I do the above, I get the results below:
 
  Warning: Wrong datatype in call to extract() in
  E:\winnt\temp\stock_in.php on line 39
 
  I've went through the query, and it seems alright. It worked previously,
  now all of a sudden it doesn't work anymore.. Can anyone help me out.

 Since apparently $row is not an array, I'd guess that mysql_fetch_array has
 nothing to fetch (i.e. no row was returned by the query).  Two things to
 get into the habit of doing:

 1) check that the query was valid.  For example:
  $result=mysql_query($sqlstmt) or die("Query error: " . mysql_error());

 2) check that the query returned 1 or more rows.  For example:
 if(mysql_num_rows())
{
$row=mysql_fetch_array($result) or  die("Row fetching error: " .
 mysql_error()); //BTW, you were missing a semi-colon on this line
...
}

 --
 CC

 --
 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]


-- 
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] Make history HOW?

2001-04-19 Thread Timothy Aslat

Aleksey Yarilovets wrote:
 PS: www.geocities.com does but how? That is the question

Try using the $HTTP_REFERER variable.  It returns the previous URL provided you
actually clicked a link to get to the current page.  It's an environment
variable, but easily handled in PHP

Cheers

Tim

-- 
| Disclaimer:| Timothy Aslat [EMAIL PROTECTED] |
| The sender of this email is a figment  | http://www.goodiesruleok.com   |
| of a deranged imagination and leaves it| Spyderweb Consulting   |
| to your own devices to decide whose... | P: 82270800M: 0401088479   |

-- 
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]




[PHP-DB] Connecting to a remote postgres database

2001-04-19 Thread Jerome O Macaranas

using PHP 4.0 under Win2K IIS 5.0 

got this error 
- Fatal error: Call to undefined function: pg_connect() in 
C:\Inetpub\PHPwwwroot\index.php on line 17

is there something i have to load.. why undefined function?

code:

$dbname = pg_connect ("host=computer.test.com port=5432 dbname=test user=user 
password=password");
echo ("DATABASE NAME = $dbname");
pg_close ("$dbname");


thanks in advance

__
www.edsamail.com

-- 
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] Connecting to a remote postgres database

2001-04-19 Thread Yasuo Ohgaki
Did you have install pgsql.dll in your system directory? and load the extension?

I noticed pg_cmdtuples() is missing, though.

--
Yasuo Ohgaki


""Jerome O Macaranas"" [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 using PHP 4.0 under Win2K IIS 5.0

 got this error
 - Fatal error: Call to undefined function: pg_connect() in
C:\Inetpub\PHPwwwroot\index.php on line 17

 is there something i have to load.. why undefined function?

 code:

 $dbname = pg_connect ("host=computer.test.com port=5432 dbname=test user=user
password=password");
 echo ("DATABASE NAME = $dbname");
 pg_close ("$dbname");


 thanks in advance

 __
 www.edsamail.com

 --
 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]



-- 
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] Concurrent update to database (PostgreSQL or MySQL) ??

2001-04-19 Thread Nicolas Guilhot

Thanks a lot for all these answers.
The discussion between Doug and Thomas was really usefull. I think I'm gonna
give a try to the timestamp/checksum method, which seems to best fit my
needs.

Best Regards,

Nicolas


-- 
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]




[PHP-DB] Connecting to a remote postgres database

2001-04-19 Thread Jerome O Macaranas

using PHP 4.0 under Win2K IIS 5.0 

got this error 
- Fatal error: Call to undefined function: pg_connect() in 
C:\Inetpub\PHPwwwroot\index.php on line 17

is there something i have to load.. why undefined function?

code:

$dbname = pg_connect ("host=computer.test.com port=5432 dbname=test user=user 
password=password");
echo ("DATABASE NAME = $dbname");
pg_close ("$dbname");


thanks in advance

__
www.edsamail.com

-- 
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] Connecting to a remote postgres database

2001-04-19 Thread Rasmus Lerdorf

Uncomment this line in your php.ini file:

extension=php_pgsql.dll

-Rasmus

On Thu, 19 Apr 2001, Jerome O Macaranas wrote:

 using PHP 4.0 under Win2K IIS 5.0

 got this error
 - Fatal error: Call to undefined function: pg_connect() in 
C:\Inetpub\PHPwwwroot\index.php on line 17

 is there something i have to load.. why undefined function?

 code:

 $dbname = pg_connect ("host=computer.test.com port=5432 dbname=test user=user 
password=password");
 echo ("DATABASE NAME = $dbname");
 pg_close ("$dbname");


 thanks in advance

 __
 www.edsamail.com

 --
 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]



-- 
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] Error Msg: Wrong data type when performing extract()

2001-04-19 Thread Russ Michell

Hmmm not sure -

You could try to strip out much of the sql by simply using:

$sqlstmt ="SELECT * FROM stock_in, equip, vendor";
$sqlstmt.="WHERE equip.id=equip_id and vendor.id=vendor_id and
equip.id='$id'";
$sqlstmt.="ORDER BY equip.id ASC";

# print $sqlstmt;
$result=mysql_query($sqlstmt);
# print $result;
$row=mysql_fetch_array($result)

That way if an error existed somewhere B4 then it'd go..

Sorry if that was next-to-useless.

Russ 

#---#

 "Believe nothing - consider everything"
   "Web Developers do it on-the-fly."

  Russ Michell
  Anglia Polytechnic University Webteam
  www.apu.ac.uk/webteam
  [EMAIL PROTECTED]
  +44 (0)1223 363271 ext 2331
  
  www.theruss.com

#---#


-- 
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]




[PHP-DB] Erro in connecting........

2001-04-19 Thread Macky

Warning: Unable to connect to PostgreSQL server: No pg_hba.conf entry for host 
xxx.xxx.xxx.xxx, user username, database dbname in C:\Inetpub\PHPwwwroot\index.php

what maybe my problem..??   

__
www.edsamail.com

-- 
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] Make history HOW?

2001-04-19 Thread Russ Michell

I have a similar PHP system on my site using sessions:

I have an admin session, where each step(1-5) is a different 
page(script) and as each page is progressed into a new session is 
registered with the users username, the activity currently being edited 
and the team within this activity they are editing.

This same method could be employed by you where the page title is 
registered as a session variable and echoed to the page. If the user 
goes back a page then check to see if the variable is set and if it is 
then unregister or destroy it, thus delivering an accurate method of 
the users progress throughout the site.

 
if(!empty($yourvar)) {
session_unregister('yourvar');
}

Hop this is of some use to you!
Regards:

Russ

#---#

 "Believe nothing - consider everything"
   "Web Developers do it on-the-fly."

  Russ Michell
  Anglia Polytechnic University Webteam
  www.apu.ac.uk/webteam
  [EMAIL PROTECTED]
  +44 (0)1223 363271 ext 2331
  
  www.theruss.com

#---#


-- 
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]




[PHP-DB] Designing a database

2001-04-19 Thread Joni Järvinen - Wandu

Hey

I'm quite new to databases so I though I'd ask you for
some tips in designing a database.

The db that I'm supposed to design holds information
about workstations: Motherboard (Motherboard id, # of pci slots,
agp slot etc etc.), Harddisks (Size, in what ide and master/slave, etc),
the physical location of the workstation and it's hardware configuration
etc.

So if you could give me some tips and pointers for what tables to create
etc I would be grateful.

TIA

-Joni-



-- 
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] Designing a database

2001-04-19 Thread Russ Michell

Designing DB's is an entire domain of study in itself!

However the rules (guidelines rather) I stick by at present but am open 
to new ones as I need them,- are:

* Don't repeat data across tables (leads to 'data redundancy' = more 
complex to update the DB)
* If in doubt 'put it' in a new table
* Use useful and memorable names for your tables and table columns

I do:

tablename_colname

Good luck!
Russ

#---#

 "Believe nothing - consider everything"
   "Web Developers do it on-the-fly."

  Russ Michell
  Anglia Polytechnic University Webteam
  www.apu.ac.uk/webteam
  [EMAIL PROTECTED]
  +44 (0)1223 363271 ext 2331
  
  www.theruss.com

#---#


-- 
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]




[PHP-DB] PHP On Linux

2001-04-19 Thread Ben Cairns

I have nearly 18 Months devel on Windows, but we are now moving to Linux,

I have never installed PHP On Linux before, so could someone pls give me an 
'Installation Guide' to follow for PHP With MySQL Support, on Linux,

Also, I would like to know what I have to do with MySQL: You know, what files 
go where etc...

Thanks.


-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com

"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK.."


-- 
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] Connecting to a remote postgres database

2001-04-19 Thread Yasuo Ohgaki
I use binary from www.php4win.de with Apache/W2K for testing codes under my PC.
Since php_pgsql.dll does not have pg_cmdtuples(), PostgreSQL/Windows combination
is not suitable for not only production use but also testing.

Did anyone compile php_pgsql.dll with pg_cmdtuples()?
If there is pg_cmdtuples(), it would be really nice.

--
Yasuo Ohgaki


""Jerome O Macaranas"" [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 using PHP 4.0 under Win2K IIS 5.0

 got this error
 - Fatal error: Call to undefined function: pg_connect() in
C:\Inetpub\PHPwwwroot\index.php on line 17

 is there something i have to load.. why undefined function?

 code:

 $dbname = pg_connect ("host=computer.test.com port=5432 dbname=test user=user
password=password");
 echo ("DATABASE NAME = $dbname");
 pg_close ("$dbname");


 thanks in advance

 __
 www.edsamail.com

 --
 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]



-- 
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] PHP On Linux

2001-04-19 Thread Martin Cabrera Diaubalick

Hello Ben,
try
http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/

as an installation guide,

and http://www.knowledgeisland.com/inet/php/php.html

for php tutorials

HTH
Regards

- Original Message -
From: "Ben Cairns" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 11:42 AM
Subject: [PHP-DB] PHP On Linux


 I have nearly 18 Months devel on Windows, but we are now moving to Linux,

 I have never installed PHP On Linux before, so could someone pls give me
an
 'Installation Guide' to follow for PHP With MySQL Support, on Linux,

 Also, I would like to know what I have to do with MySQL: You know, what
files
 go where etc...

 Thanks.


 -- Ben Cairns - Head Of Technical Operations
 intasept.COM
 Tel: 01332 365333
 Fax: 01332 346010
 E-Mail: [EMAIL PROTECTED]
 Web: http://www.intasept.com

 "MAKING sense of
 the INFORMATION
 TECHNOLOGY age
 @ WORK.."


 --
 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]




-- 
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] Designing a database

2001-04-19 Thread B. van Ouwerkerk


So if you could give me some tips and pointers for what tables to create
etc I would be grateful.

You can find a few articles on www.devshed.com about database normalization.

The whole idea is to put every piece of data only once in your database. 
And refer to them as an ID. Every ID must be unique and should never 
change.. so someones postalcode is a very bad idea.

You can think of multiple designs.. I'm not going to do it for you.. It 
will and does take some time and.. unfortunately I'm not having lots of it :(

To start you need to write down all data you want to add.. and what you 
want to be able to pull out of the database.. I found some good pointers in 
the book MySQL written by Paul DuBois. It handles MySQL and connections to 
MySQL databases..

Have fun..



B.


-- 
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]




[PHP-DB] Secure database connectivity?

2001-04-19 Thread Stuart Marlow

Hi people,

I'm setting up a database to collect email addresses on my web site, but I
want to avoid using the insecure connection method:

mysql_connect("host", "user", "pass")

as this obviously displays my username and password to anyone who wants it.

So I need a secure method for PHP to access a MySQL DB - I expect there's a
million different ways of doing it, and I doubt any of them are simple...!

Cheers.


-- 
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] Secure database connectivity?

2001-04-19 Thread B. van Ouwerkerk


So I need a secure method for PHP to access a MySQL DB - I expect there's a
million different ways of doing it, and I doubt any of them are simple...!

You could start including a file from outside your HTML directory.. so 
Apache can't show it to the world.. but PHP can get it for inclusing..

I don't say this is the most secure way.. but much better then putting them 
all in your HTML directory..

Bye,


B.


-- 
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]




[PHP-DB] can't connect to mysql

2001-04-19 Thread johndmiller

I just looked at my mysql.sock file and it has a length of zero.  Is this
the right size, I don't think it is.  If not, do I have to reinstall MySQL
to get the file back or can I get it from somewhere else.

FYI:
running RH7.0, Apache

Thanks,
John


-- 
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]




[PHP-DB] New with MySQL 3.23: Commands out of sync error

2001-04-19 Thread Alexander Fordyce

Hi.

I have just run into a strange problem that I'm having a hell of a time
extricating myself from.  Here's the story...

Recently, I upgraded to MySQL 3.23.33, mainly to experiment with some of the
new transactional capabilities.  But a whole chunk of code which had always
worked perfectly began failing.  After adding evil debug code to display all
MySQL error messages, I found that I was getting the following error when
trying to retrieve data from a query result:

  "Commands out of sync; You can't run this command now"

I looked up this error on the mysql site, and was taken to this page...
http://www.mysql.com/doc/C/o/Commands_out_of_sync.html
It mentions the need to use the command mysql_use_result(), but php doesn't
support that.  I understand that it's on the "to do" list.

Does anyone else have experience with this problem?  At the moment, it has
me completely incapacitated, as moving back to MySQL 3.22 is not an option.
The applications in question are seriously heavy with database usage, and
can't really be slimmed down.

(Another problem which may be related is that I have been getting
unpredictable results connecting to the database with mysql_connect and
pconnect -- sometimes it fails to connect for no apparent reason (about 1
time in 20, maybe (which is a lot))).

Thanks in advance...
Alex

- - - - - - - - - - - -
Alexander Fordyce
[EMAIL PROTECTED]


-- 
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]




[PHP-DB] Variables and DB

2001-04-19 Thread Rui Machado

Hello

I'm writting a registration form with connection to
mysql DB, but I have a problem in the last step, I
can't access the variables to put them in the DB.
I'm using the same file to process the form, but the
last step is confirmation of the data and insertion in
the DB, here it fails because I can't submit the
variables.

Any clue?

I was thinking of doing hidden types but I think this
is not the best way.

Use GLOBALS?

Thanks

Rui Machado

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

-- 
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] Variables and DB

2001-04-19 Thread Johannes Janson

how about posting the code? or describe
the problem a bit closer.

Johannes

"Rui Machado" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello

 I'm writting a registration form with connection to
 mysql DB, but I have a problem in the last step, I
 can't access the variables to put them in the DB.
 I'm using the same file to process the form, but the
 last step is confirmation of the data and insertion in
 the DB, here it fails because I can't submit the
 variables.

 Any clue?

 I was thinking of doing hidden types but I think this
 is not the best way.

 Use GLOBALS?

 Thanks

 Rui Machado

 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/

 --
 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]




-- 
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] Sessions w/ Communicator 4.7 Problem

2001-04-19 Thread Johannes Janson

Hi,

 $test = "The session data was transferred.";
 echo "Click this link: a href=\"test2.php?".SID."\"test2.php/a";

change this to a href=\"test2.php?id=$PHPSESSID\"test2.php/a";

you need to specify a variable name first behind the ?. It worked
for me on NS 4.75

Johannes


 --
 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]




-- 
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]




[PHP-DB] PHP and MySQL

2001-04-19 Thread Mike Corredea

I just downloaded MySQL-3.23.36.tar (Which is the Source tar) from their
site and I have php-4.0.4pl1. I have installed MySQL and it is ready to
go. I know this for I can connect via the MySQL Monitor. When I try to
configure php with the line "./configure
--with-apache=/usr/local/apache_1.3.19 --with-mysql --with-ldap
--enable-track-vars" it tells me that it can't find the header files.
Then I point it to the header files, after that I get the error "can't
find client lib". What should I do about this ?? Where do I tell php to
look for it ??


-- 
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]




[PHP-DB] Fw: sending e-mail thru PHP page.

2001-04-19 Thread Hector M Banda


- Original Message - 
From: Hector M Banda 
To: [EMAIL PROTECTED] 
Sent: Thursday, April 19, 2001 10:11 AM
Subject:  sending e-mail thru PHP page.


Hi all,
I have  mysql as the database for my php pages  where I store my information. When I'm 
done,
I send an e-mail to my e-mail account just to be aware of who is using it. The problem 
is that when I use the following code to send the e-mail, I get 'nobody' as the sender.

mail([EMAIL PROTECTED], "Message",$body message);

is not a big deal saying that but since I'm going to be doing this on my server to do 
virtual domains, my friends will ask me sooner or later about this little issue.

Sorry for this off topic.


TIA.




Re: [PHP-DB] Fw: sending e-mail thru PHP page.

2001-04-19 Thread Russ Michell

HaHa!! I'm just sorting that one too:

Try:
$sender = "[EMAIL PROTECTED]";
mail("$mail_to","$subject","$body","From: $sender");

That should do it...

Also check out the threads on phpbuilder.com:

http://www.phpbuilder.com/forum/read.php3?num=2id=117925loc=0thread=117925


Good luck!!

Russ

#---#

 "Believe nothing - consider everything"
   "Web Developers do it on-the-fly."

  Russ Michell
  Anglia Polytechnic University Webteam
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam
  t: +44 (0)1223 363271 x 2331

  www.theruss.com

#---#


-- 
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] mysql -- Commercial DBs, When will I need to upgrade?

2001-04-19 Thread B. van Ouwerkerk


If anyone has had some experience with upgrading as your operations grow, 
I'd appreciate if you could answer ANY of the following questions:

Did you say M$.. yuck.. if you think you need something else then MySQL you 
could take a look at PostgreSQL.. It's good, it's free and it doesn't have 
M$ written all over it :-)

The subject sounds like commercial databases are better then OpenSource..
I don't think that's treu. You could find great solutions in OpenSource.. 
Like MySQL.. PostgreSQL and others.. I even know quite a few people on 
several lists who kicked off commercial products and started using 
opensource.. for various reasons.

If you look at the specs.. you will see MySQL performs very good.. also 
with large databases.

Having your own dedicated server will help you to get better performing 
websites..
Memory.. the more.. the better.. you can have to little but never to much 
of it..

If you're currently experiencing performance problems I would assume a 
dedicated server might help..

Bye,


B.

P.S. the subject is great flamebait..


-- 
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] PHP and MySQL

2001-04-19 Thread olinux

try the tutorial at www.thickbook.com or at www.devshed.com for setting
everything up.

olinux

- Original Message -
From: "Mike Corredea" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 19, 2001 10:02 AM
Subject: [PHP-DB] PHP and MySQL


 I just downloaded MySQL-3.23.36.tar (Which is the Source tar) from their
 site and I have php-4.0.4pl1. I have installed MySQL and it is ready to
 go. I know this for I can connect via the MySQL Monitor. When I try to
 configure php with the line "./configure
 --with-apache=/usr/local/apache_1.3.19 --with-mysql --with-ldap
 --enable-track-vars" it tells me that it can't find the header files.
 Then I point it to the header files, after that I get the error "can't
 find client lib". What should I do about this ?? Where do I tell php to
 look for it ??


 --
 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]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
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]




[PHP-DB] db3 problems

2001-04-19 Thread Mike Robinson

Hello,

Has anyone experienced any problems with the db3 stuff in
php4.0.4pl1? Im getting some segfaults accessing db3 files
in certain modes, and driver initialization errors any other
time, this on a redhat 6.1 box with db3.2.9 installed from source.

On a redhat 7.0 box with db3-3.1.14-6 installed from rpms
(STock redhat install) it all works well except accessing a db3 file
in 'c' mode if it already exists (see bug report 10380).

Any insight would be most appreciated.
TIA.

Mike Robinson




-- 
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] Values for Popdownmenu (Categorie and Subcategorie) from MySQL

2001-04-19 Thread Ron Brogden

At 01:51 AM 4/20/2001 +0200, Denis Mettler wrote:
I know how i can fill the values in the first popdownmenu,
but i don't know how to handle the second one withe the chosen
value from the first.

If you mean that you want a selection in the first drop down list to 
automagically trigger a change in a second drop down list your *only* 
options are to either use Javascript (yuck) or to make this a two step 
process (i.e. select from the first list, submit form, generate second list).

I personally would recommend the second option since you probably have no 
guarantee that Javascript will be enabled and you will have to perform the 
sanity checking anyways.

Cheers,

Ron
-
Island Net AMT Solutions Group Inc.  Telephone:  250 383-0096
1412 Quadra  Toll Free:1 800 331-3055
Victoria, B.C.   Fax:250 383-6698
V8W 2L1  E-Mail:[EMAIL PROTECTED]
Canada   WWW:   http://www.islandnet.com/
-


-- 
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[2]: [PHP-DB] OCI_DEFAULT

2001-04-19 Thread Victor Foitzik

Hello Johannes,
on 19.04.2001 you wrote:

 hi,

 OCIExecute() executes a previously parsed statement. (see OCIParse(). The
 optional mode allows you to specify the execution-mode (default is
 OCI_COMMIT_ON_SUCCESS). If you don't want statements to be committed
 automaticly specify OCI_DEFAULT as your mode.

that's right, but had anyone of you the same problem i had ? consider
the following situation: using persistent connections and specifying
OCI_DEFAULT works quite okay, but subsequent calls to OCIExecute
remain in the OCI_DEFAULT state, whether or not you specify
OCI_COMMIT_ON_SUCCESS. this means that executes made with this call
remain uncommitted. Even more, scripts that reuse the connection are
not able to do normal queries with this connection.

Am I doing something really nasty, or is this just a feature i don't
understand ? Tested PHP versions were 4.0.3pl and 4.0.4pl1 both on
FreeBSD and Debian ...

Hope somebody knows about ...

Victor



-- 
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] Advice On Building Dynamic MySQL Queries

2001-04-19 Thread Victor Foitzik

Hello JD,
on 19.04.2001 you wrote:

 I am building a query from a search form. This is the code I have now:

 if (!empty($whereclause))
  {
 $whereclause=urldecode($whereclause);
  $whereclause=stripslashes($whereclause);
  }

  extract($HTTP_POST_VARS);

  if (!empty($Price))
  {
 if(empty($whereclause))

--- blah blah blah ---

 It Just became apparent that I am going to need to add a whole bunch more
 search criteria.. Does anyone have any advice/suggestions for getting rid of
 all those if statements?

 JD

what about using a foreach statement and going through all the
variables you need like this ?

$myvars = array('Price', 'Stuff', 'Thing');
foreach ($myvars as $varname) {
if (!empty($$varname)) {
   // do funky stuff here
}
}

HTH
Victor



-- 
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] Advice On Building Dynamic MySQL Queries

2001-04-19 Thread Joe Brown

My solution was almost as elegent...

  $query="select * from customers";
  $queryand=false;
  if(!empty($f_Account)) {
$query.=" WHERE upper(P.Account) like upper('$f_Account')";
$queryand=true;
  }
  if(!empty($f_First_Name)) {
$query.=($queryand?" AND ":" WHERE ")."upper(p.First_Name) like
upper('$f_First_Name')";
$queryand=true;
  }
...

For searchs, case doesn't matter (in my example), but you do need to index
your table accordingly for best results.

Also note upper() is the oracle uppercase function.  I believe the uppercase
function varies from one RDBMS to another.

"Victor Foitzik" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello JD,
 on 19.04.2001 you wrote:

   if (!empty($Price))
   {
  if(empty($whereclause))
   {
   $whereclause.="Price$Price";
   }
   else
   {
  $whereclause.=" AND 'Price $Price";
  }
   }

 and even better would be:

 if (!empty($$varname)) {
$whereclause .= ($whereclause ? ' AND ' : '').
 "$varname =" . $$varname;
 }

 or something like this ;-)

 HTH
 Vic



 --
 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]




-- 
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]