Re: [PHP-DB] approaching a relational database

2002-12-16 Thread olinux
what kind of stats are you storing - scores? what fields do you need to store - these are necessary to help you start with the top and work your way down - courses have name, location, holes, members etc. - holes have par, distance, blah - members have blah, blah You can add/remove fields

[PHP-DB] phppgAdmin connection prodblem

2002-12-16 Thread Tjoumaidis Tassos
Hello to everyone, I have a problem connecting to database with the phppgadmin i have put in the pg_hda.conf the line local all trust which i think gives access to all the users in the local system to all the databases but i cannot connect with phppgadmin with any conf i have tried. Thx in

[PHP-DB] Re: Querying two tables

2002-12-16 Thread Stas Trefilov
Cesar Aracena wrote: Table 1 - Categories catid (autonum) catname Table 2 - Sub categories subcatid (autonum) subcatname Table 3 - Products prodid (autonum) prodname Table 4 - Relationships Catid Subcatid Prodid Now, the question is how to fetch all the sub-categories let's say that are

[PHP-DB] Re: approaching a relational database

2002-12-16 Thread Stas Trefilov
Doug Parker wrote: I'm about to embark on a project where I have to enter many, many fields into a MySQL database, and I don't know how to approach the database structure. The data is statistics for a golf course. There are 18 holes, and each hole has a Red Tee Par, White Tee Par, and Blue

[PHP-DB] Re: approaching a relational database

2002-12-16 Thread Doug Parker
The grid for each course looks like this (excluding CourseName, State, County, Street, City, State) Hole1 | Hole2 | Hole 3 | . | Hole18 Par 9 47 .. 6 WH 8 44 .. 5 MH 5

[PHP-DB] Get error message, need help

2002-12-16 Thread David
Hello all, I am new to PHP so I am going to need some help. I am trying to create a admin login page. But I am getting this error message: Parse error: parse error, unexpected T_VARIABLE in c:\program files\apache group\apache\htdocs\sunwestsilver\admin\tmpi5pcf76sy9.php on line 43

Re: [PHP-DB] phppgAdmin connection prodblem

2002-12-16 Thread Cornelia Boenigk
Hi Yesterday I tried out phppgadmin. I didn't chage anything in the pg_hba.conf but only edited the config.inc.php.dist file in the phppgadmin distribution and saved it as config.inc.php. These are the lines I changed: $cfgSuperUser = superuser_name; $cfgServers[1]['host'] = 'localhost';

Re: [PHP-DB] Get error message, need help

2002-12-16 Thread Ignatius Reilly
You should write: $myquery = SELECT * FROM user WHERE username = '{$user}' ... ; As a bonus, it is much more readable. Ignatius - Original Message - From: David [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 16, 2002 2:16 AM

Re: [PHP-DB] Get error message, need help

2002-12-16 Thread Adam Voigt
Your missing a semicolon (;) after your first $myquery = line. - Original Message - From: David [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 16, 2002 2:16 AM Subject:

[PHP-DB] Get error message, need help

2002-12-16 Thread Cornelia Boenigk
Hi David // Query Database with username and encrypted password #$myquery = SELECT * FROM user WHERE username = ' . $user #$myquery = .' AND password = ' . crypt($password, xpz8ty) . '; #$result = mysql_query($myquery); In the first line of the query there is no semicolon at the end of

[PHP-DB] Re: approaching a relational database

2002-12-16 Thread David Eisenhart
I would go along the lines that Stas suggests. You appear to have a two table database here: Table1: tblHole hole_id, hole_no, course_id, par, WH, MH, Trees1, Trees2, Trees3 etc... --- -- - --- - 1 1 1

[PHP-DB] CMS error

2002-12-16 Thread mike karthauser
I have a field in a news CMS that could contain Infact most of the time it does in the form of URL's etc. Getting the data initially into the database is no problem - Infact MySQL shows has no toruble with it. The problem i am getting is when i edit the data - basically loading into a form -

Re: [PHP-DB] CMS error

2002-12-16 Thread mike karthauser
on 16/12/02 5:15 pm, mike karthauser at [EMAIL PROTECTED] wrote: I have a field in a news CMS that could contain Infact most of the time it does in the form of URL's etc. Getting the data initially into the database is no problem - Infact MySQL shows has no toruble with it. The problem i am

[PHP-DB] Re: approaching a relational database

2002-12-16 Thread Doug Parker
Gotcha. thanks to everyone for the advice. I'm going to switch it to the 2 table format. Thanks again, Doug David Eisenhart wrote: I would go along the lines that Stas suggests. You appear to have a two table database here: Table1: tblHole hole_id, hole_no, course_id, par, WH, MH,

RE: [PHP-DB] CMS error

2002-12-16 Thread John W. Holmes
I have a field in a news CMS that could contain Infact most of the time it does in the form of URL's etc. Getting the data initially into the database is no problem - Infact MySQL shows has no toruble with it. The problem i am getting is when i edit the data - basically loading into a form

[PHP-DB] Permission denied! !§$!§$

2002-12-16 Thread Jim Hatridge
Hi all... I've at last got safe_mode turned off (I think). But when I try to do an unlink I get this: Warning: unlink() failed (Permission denied) in /home/hatridge/public_html/Database/currency.php on line 12 Also I'm trying to do exec() and it just ignore it. I've checked the permissions

[PHP-DB] Listing A Certain # Range

2002-12-16 Thread conbud
Hello, Im using MySQL and PHP 4.2.3 on Apache and Mandrake Linux, I was wondering how to get PHP to list let says row 5 - 10 from a database, I read the MySQL manual and all I could find is LIMIT 0,5 to list just the first 5, but I dont know how to make that list 5 - 10 or 10 - 15. Any help

RE: [PHP-DB] Listing A Certain # Range

2002-12-16 Thread Aaron Wolski
LIMIT 5,10 LIMIT 10,15 Something like that should work. Aaron -Original Message- From: conbud [mailto:[EMAIL PROTECTED]] Sent: December 16, 2002 3:10 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Listing A Certain # Range Hello, Im using MySQL and PHP 4.2.3 on Apache and Mandrake Linux,

Re: [PHP-DB] Listing A Certain # Range

2002-12-16 Thread 1LT John W. Holmes
LIMIT 5,10 LIMIT 10,15 Something like that should work. Not quite. LIMIT n,m where n is the starting point and m is how many rows you want returned. LIMIT 5 or LIMIT 0,5 LIMIT 5,5 LIMIT 10,5 etc... ---John Holmes... Im using MySQL and PHP 4.2.3 on Apache and Mandrake Linux, I was

[PHP-DB] Oracle/PHP question...

2002-12-16 Thread NIPP, SCOTT V (SBCSI)
I am now trying to setup connectivity to a remote Oracle database for my PHP/Apache web server. I am attempting to verify connectivity to the database by: ?php $connection = OCILogon(user, password) or die (Unable to logon to database.); ? I have installed the Oracle client on

Re: [PHP-DB] Selecting more than asked for

2002-12-16 Thread Alex Francis
Thanks to everyone for your help. It was my own stupidity which was collecting the wrong data. I wasn't passing the value of unit_id to my table. Andre gemünd [EMAIL PROTECTED] wrote in message 000b01c2a3af$753d2160$596d8550@lithium3">news:000b01c2a3af$753d2160$596d8550@lithium3... You shouldnt

RE: [PHP-DB] Oracle/PHP question...

2002-12-16 Thread Ryan Jameson (USA)
If your webserver is win32 then you need to uncomment the line in php.ini that says : ;extension=php_oci8.dll if it is unix based I am not sure what you need to do. Ryan -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 1:58

RE: [PHP-DB] Oracle/PHP question...

2002-12-16 Thread NIPP, SCOTT V (SBCSI)
Thanks, but my web server is HP-UX. Didn't anyone ever tell you Win-blows sucks? :) -Original Message- From: Ryan Jameson (USA) [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 3:07 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Oracle/PHP question... If your

RE: [PHP-DB] Oracle/PHP question...

2002-12-16 Thread Ryan Jameson (USA)
:-) ... Windows is the best at running the C# .NET applications I have to build to :make everyone happy that we are industry standard ... when big brother is not :looking I use PHP for everything I can get away with. I'm actually very impressed :with how easily PHP integrates into an IIS /

RE: [PHP-DB] Oracle/PHP question...

2002-12-16 Thread Ryan Jameson (USA)
BTW... I'm not the one stuck trying to figure out how to recompile my current version of PHP to include the oci functions... haha! And guess what, with every release you get to do it all over again... so polish up on the shell scripting unless you want to reinvent the wheel every month or two.

RE: [PHP-DB] Oracle/PHP question...

2002-12-16 Thread NIPP, SCOTT V (SBCSI)
Figuring how shouldn't be too tough. Compiling software for the most part is a breeze. My concern was whether I needed to recompile or not. I am now trying that, and hopefully this will address the problem for me. As to the recompiling with every release, that is no big deal either as

Re: [PHP-DB] Updating data on remote server

2002-12-16 Thread 1LT John W. Holmes
Do you have root access to the internet MySQL server? The easiest way to do this would be to use replication, I think. It doesn't sound too difficult to set up and it would do all of the updating for you. Is that an option? If not, then you can enable binary logging (I think that's what it is) in

RE: [PHP-DB] Permission denied! !§$!§$

2002-12-16 Thread Ruprecht Helms
Hi Jim Hatridge, Warning: unlink() failed (Permission denied) in /home/hatridge/public_html/Database/currency.php on line 12 permissions and all are either 666 or 777. The modification 777 means everyone can do everything. So there can't be any problem in writing or reading. Insert a

[PHP-DB] Please Help

2002-12-16 Thread Petre NICOARA
Hi, guys I have a small and delicate problem. This I think, involves using the rewriterule from apache server, but I don't know where to post it Here's my situation : Until recently, my client had his site on a stack server. In this way, all his pages where addressed by :

[PHP-DB] pictures into MySQL

2002-12-16 Thread Seabird
Hi everyone, I know that inserting actual pictures into a MySQL DB is not the best solution, but since I know the size is going to be limited I want to do it anyways. How do I upload a picture into a DB? (what type of table etc.). Jacco -- http://seabird.jmtech.ca Attitude is Everything! But

[PHP-DB] How can I use PHP to duplicate a mysql template database?

2002-12-16 Thread Daevid Vincent
I need to use PHP to duplicate the schema of a database. This seems like it should be a simple task -- taking a 'template' db and cloning it with a new name. I've tried things like: $filename = myDB.sql; $fd = fopen ($filename, r); $sql = fread

[PHP-DB] How to return records in _random_ order ???

2002-12-16 Thread tmb
I need to... 1 - Select a set of records from a db 2 - Return a list of one or two fields from the selected record set in random order on a web page. Once I have my selected records fields... say I end up with 20 records after my select query... How can I return the selected records in

Re: [PHP-DB] How to return records in _random_ order ???

2002-12-16 Thread Miles Thompson
I dunno - why does this topic pop up periodically. Anyway, here are two suggestions: 1. Add a field to the table, called rand_order. Whenever you update the table insert a random number in it and when fetching records order by Rand_order. 2. Generate an array of 20 random numbers and use it

RE: [PHP-DB] How to return records in _random_ order ???

2002-12-16 Thread John W. Holmes
I need to... 1 - Select a set of records from a db 2 - Return a list of one or two fields from the selected record set in random order on a web page. Once I have my selected records fields... say I end up with 20 records after my select query... How can I return the selected

Re: [PHP-DB] How to return records in _random_ order ???

2002-12-16 Thread Peter Beckman
Try this; it only works on certain versions of mysql: select * from table order by rand(); Peter On Tue, 17 Dec 2002, Miles Thompson wrote: I dunno - why does this topic pop up periodically. Anyway, here are two suggestions: 1. Add a field to the table, called rand_order. Whenever you

Re: [PHP-DB] How to return records in _random_ order ???

2002-12-16 Thread tmb
Thanks Miles. Long story about why they need to be random. I'll give all the suggestions here a good review. Thanks everybody for the help. tmb Miles Thompson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I dunno - why does this topic pop up periodically.

[PHP-DB] login won't log in, HELP

2002-12-16 Thread David
Hello, I am pretty new to PHP and I am trying to create a admin login page so my client can view thier product line and orders. I have MySQL set-up properly and have data in it and I am able to view information from the db with no problem. I do all my testing on my local machine before I blast

Re: [PHP-DB] Re: Listing A Certain # Range

2002-12-16 Thread Peter Beckman
On Tue, 17 Dec 2002, conbud wrote: Conbud wrote: Hello, Im using MySQL and PHP 4.2.3 on Apache and Mandrake Linux, I was wondering how to get PHP to list let says row 5 - 10 from a database, I read the MySQL manual and all I could find is LIMIT 0,5 to list just the first 5, but I dont