[PHP-DB] Problem w/ mysql_pconnect

2002-06-23 Thread Paul D
I'm using PHP 4.2.0 with MYSQL 3.23. When I try to use either the mysql_connect or mysql_pconnect to access the database, I get the following error message: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) I have tried different user names and nothing seems to work. If I use

RE: [PHP-DB] Problem w/ mysql_pconnect

2002-06-23 Thread Chris Barnes
Hi Paul, I'm no MySQL expert and i'm only very new to this list but i have had the same problem before. What i did to fix the problem was replace "localhost" with the ip address of the machine...so on my network i my MySQL server is 10.3.2.1 so i used "10.3.2.1" instead of "localhost" and it worke

Re: [PHP-DB] Problem w/ mysql_pconnect

2002-06-23 Thread Tony
You must create an account in MySQL with root user first, and grant the account with the privileges you want it to have. Tony S. Wu Chris Barnes at [EMAIL PROTECTED] wrote: > Hi Paul, > I'm no MySQL expert and i'm only very new to this list but i have had the > same problem before. > What i did

[PHP-DB] Problem whith mysql_connect()

2002-06-23 Thread Fernando Gonzalez
When I try to connect to mysql on a linux server It gives me the following message: "Fatal error: Call to undefined function: mysql_connect() in /home/web/media/conection.inc on line 2" It seems there is a problem in the php configuration, however I am not an expert so need help to fix this.

[PHP-DB] Re: Problem w/ mysql_pconnect

2002-06-23 Thread Paul D
Guys, I appreciate your input very much. This machine is a standalone unit. That's why I'm using "localhost". The user account has already been set-up in MySQL with the correct privileges, and I'm able to login at the console command prompt using "mysql -h localhost -u pauld -p my_pwd", with

[PHP-DB] question from newbie

2002-06-23 Thread Chris Barnes
Hi people, Im quite new to the list. I am trying to construct a php script that will take a string submitted from a web site, break it up into keywords and add to an array, then perform a query to a mysql db for each keyword in the array. It will then send the result to the browser. the script i

[PHP-DB] Re: question from newbie

2002-06-23 Thread Andy
Hi Chris, if you have your keywords already in an array all you have to do is to create the statement: foreach($arrayname AS $value) $where_stmt .= OR $value; $stmt = "SELECT ... WHERE ".$where_stmt "; you might have to include an if stmt in the foreach loop because you are not allowed

[PHP-DB] Question

2002-06-23 Thread Mike Tuller
I am wanting to create a PHP frontend to a database that holds information about the computers that I take care of. I have a problem though when it comes to storing hard drive information. In most cases, the computers have one drive, but some have 2 or more, so I can't create the main database wit

Re: [PHP-DB] Question

2002-06-23 Thread Duncan Hill
On Sun, 23 Jun 2002, Mike Tuller wrote: > I know I will need to create a separate table to hold information about > the drives, and connect them to the computer by attaching the primary key > of the drives table to the Computer table. Good, you know a bit about normalisation. But, not enough.

RE: [PHP-DB] Question

2002-06-23 Thread Chris Barnes
i dont know how will this will work, but you could try storing the multiple hard disk details for each computer in an "array" in 1 field. then when you want to get the information from the db, use explode() to store the value in the field into an array again. e.g. the field in the DB might look l

Re: [PHP-DB] Problem whith mysql_connect()

2002-06-23 Thread Jason Wong
On Monday 11 June 2001 23:46, Fernando Gonzalez wrote: > When I try to connect to mysql on a linux server It gives me the following > message: > > "Fatal error: Call to undefined function: mysql_connect() in > /home/web/media/conection.inc on line 2" The error means that your version of PHP was n

Re: [PHP-DB] Question

2002-06-23 Thread Mike Tuller
That would probably work, but only for what I want right now. If I ever wanted to create a report of all the hard drives I have, it would become more difficult. I know I need to have a separate table in the database for the drives, but am not sure if the foreign key should be drives in the comput

RE: [PHP-DB] Question

2002-06-23 Thread Peter Lovatt
Hi The correct way, IMHO, would be to consider the situation. The hard drives are a sub component of the computer. In which case the hard drive table should be a 'child' of the computer table. However the hard drives could be an item in their own right too. So if you want to consider the hard d

Re: [PHP-DB] Question

2002-06-23 Thread Mike Tuller
That is where I am at. Which is better to use. Only need space for 4 drives with the computers I currently use, but what if I purchase a server that takes 16, and what other things might the future hold? I think I will be better off having the drives separate and just match the drives with the co

RE: [PHP-DB] Finding numbers in a string

2002-06-23 Thread Russ
Seth: You should have another colon ' : ' after your alnum expression: if(ereg("[[:alnum:]]+", $textandnumbers, $numbers)) { print("$numbers"); } I'm not sure but you also may want to lose the double quotes or maybe escape them. Good luck. Russ -Original Message- From: Seth Y

RE: [PHP-DB] E-mail address verification

2002-06-23 Thread Beau Lebens
also, you might like to do some client-side validation before sending it to the server, in which case you can use somehting like http://www.dentedreality.com.au/jsvalidation/ HTH Beau // -Original Message- // From: [EMAIL PROTECTED] // [mailto:[EMAIL PROTECTED]] // Sent: Friday, 21 June

[PHP-DB] sql standard

2002-06-23 Thread Gerard Samuel
Hope someone can confirm this. I was moving a mysql dump to postgresql, and I had 2 tables with MiXeD upper/lower case letters, that got converted to lowercase. I found a discussion that sql column/table/database names should be lowercase. Just trying to keep in line with a standard. Thanks --

[PHP-DB] Whats more efficient....?

2002-06-23 Thread Matthew Nock
Is it more efficient to run a SELECT query on a MySQL database that retrieves maybe 100 records from approximately 6 tables (based on one result - such as a product ID) and then process these results using PHP or is it more efficient to run say 6 SELECT statements that get the exact details w

Re: [PHP-DB] sql standard

2002-06-23 Thread Steve Farmer
Hi, In Oracle they are all UPPERCASE !! Rgds Steve At 11:15 PM -0400 23/6/02, Gerard Samuel wrote: >Hope someone can confirm this. >I was moving a mysql dump to postgresql, and I had 2 tables with >MiXeD upper/lower case letters, that >got converted to lowercase. I found a discussion that sql

[PHP-DB] Re: [PHP] Re: ARRAY, IF & INSERT

2002-06-23 Thread Jesper Brunholm
César aracena wrote: > The catch would be to make PHP to auto assign the relatives "level" by > knowing it has to start from $i=1 and loop $i++ until no other kid is > inserted. Now that I write it, it seems I could use a for loop, but what > should be the structure of it using the $name <> 0 you