[PHP-DB] category structure

2001-10-28 Thread olinux
anyone have any ideas on this I have a table of directory categories id | parentid | category so... 1 | 0 | blah1 top 2 | 1 | blah2 sub 3 | 1 | blah3 sub2 4 | 3 | blah4 sub2->sub I want to hit the DB only once so i select all and drop into array Now i've created array with these

[PHP-DB] Re: php command to create table

2001-10-28 Thread _lallous
mysql_query(" CREATE TABLE abcd (FieldName1 INT (3) UNSIGNED DEFAULT '0' AUTO_INCREMENT, FieldName2 TINYINT (3) UNSIGNED DEFAULT '0', PRIMARY KEY(FieldName1), UNIQUE(FieldName1)) "); "Saulius Jankauskas" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > subj. Plz

[PHP-DB] mySQL table update

2001-10-28 Thread Niklas Lampén
I have a large table with quite many dates in format dd.mm. (don't ask why :) and I want to convert them into -mm-dd for obvious reasons. How can I do this the smartest way? I know I could do it with php and update it row by row but that doesn't seem too smart. Can I somehow do a copy from

[PHP-DB] Oracle 9i

2001-10-28 Thread Juan Leon
Hello, Has anyone managed to get PHP to link with Oracle9i? I suspect some Oracle 9 lib is OCI8-compatible, so it shouldn't be too hard to get this to work -- possibly a small change to the configure script. Unfortunately I don't know enough about Oracle to make this happen. A previous art

Re: [PHP-DB] counting categories

2001-10-28 Thread Frank M. Kromann
Hi, Depending on the database you are selecting from you could do it in one select like this: select category, count(*) from $table group by category order by category; - Frank > How would you get the count of each category? > > Like this - http://www.scriptsearch.com > > Would you have to

RE: [PHP-DB] Application variables

2001-10-28 Thread Beau Lebens
php doesn't have application variables as such, however there are a couple options for implementing them... 1. have a single file with your "application variables" and manually include that in all files of the project 2. use the session_*() functions to "keep the vars alive" on pages 3. as you sa

[PHP-DB] counting categories

2001-10-28 Thread olinux
How would you get the count of each category? Like this - http://www.scriptsearch.com Would you have to run a different select for each one? or would you do something like "select category from $table " and then count all of the matches for each category "perl" "php" "asp" thanks much, Josh

Re: [PHP-DB] create table with php -whats wrong?

2001-10-28 Thread Richard S. Crawford
Place your query in a string variable, like $sSql, and use the mysql_query command to execute the query. For example: $sSql="CREATE TABLE test (id TINYINT not null AUTO_INCREMENT, process LONGTEXT not null , title LONGTEXT not null , description LONGTEXT not null , PRIMARY KEY (id))"; if (!m

Re: [PHP-DB] create table with php -whats wrong?

2001-10-28 Thread DL Neil
> Hello all. > > I am trying to create simple test table with php, but I get: > > Parse error: parse error in /home/vanesaw/public_html/create.php on line 5 > > Line 5 is command to create table (see code below). > > Whats wrong with it? Thanks. > > $sql = mysql_connect("host", "

[PHP-DB] create table with php -whats wrong?

2001-10-28 Thread Saulius Jankauskas
Hello all. I am trying to create simple test table with php, but I get: Parse error: parse error in /home/vanesaw/public_html/create.php on line 5 Line 5 is command to create table (see code below). Whats wrong with it? Thanks. done -- PHP Database Mailing List (http://www.p

[PHP-DB] Help with PHP CSS selector

2001-10-28 Thread Brian Tegtmeier
Currently I have PHP code that runs a server side check on your browser (placed above the tags) and assigns a certain CSS stylesheet to it. The problem I have with the current code is it only goes by the browser and not both the browser and platform. I have the source code (listed below) that

[PHP-DB] dbase help!!

2001-10-28 Thread Alejandro Viana
I'm trying to read a record from a dbase data base so I've previously opened it successfully. The problem is that I call the function dbase_get_record, but it returns no records. The database is ok because I call the funcion dbase_numfields and dbase_numrecords and they give me correct information

[PHP-DB] PHP 4 Book

2001-10-28 Thread PHP Newbie
Hello! =) I'm just starting to learn PHP but I don't know what book shall I use. Can you recommend to me a good PHP book that is FREE for download except the PHP Manual? Please include the complete URL of that book. Thanks. Any help will be much appreciated. =) __

Re: [PHP-DB] Resource id #2

2001-10-28 Thread DL Neil
I am trying to select a message from a table in a database. the message will will be in column 'msg' and will be in same row as id='0'. I need that msg put to the screen. With the code below I get the error: Resource id #2 Can someone please explain how I can fix this.. Thankyou in advance. $m

Re: [PHP-DB] HELP PLEASE!! Get query error when inserting into MySql

2001-10-28 Thread DL Neil
Joshua, Thanks for this. The original question wasn't mine, but I'm sure Robby will be interested to read it... =dn - Original Message - From: "Joshua Long" <[EMAIL PROTECTED]> To: "DL Neil" <[EMAIL PROTECTED]> Sent: 28 October 2001 07:10 Subject: Re: [PHP-DB] HELP PLEASE!! Get query e

[PHP-DB] Resource id #2

2001-10-28 Thread Andrew Duck
I am trying to select a message from a table in a database. the message will will be in column 'msg' and will be in same row as id='0'. I need that msg put to the screen. With the code below I get the error: Resource id #2 Can someone please explain how I can fix this.. Thankyou in advance. $m

[PHP-DB] Mathematics Examples MySQL and PHP

2001-10-28 Thread Mark Weber
Hello Everybody, Does anybody have some examples about howto make mathematic functions in PHP with values from any MySQL table such as: Value 1 + Value 2 = Value 3 Value 1 - Value 2 = Value 3 Value 1 * Value 2 = Value 3 Value 1 / Value 2 = Value 3 With kind regards, -

Re: [PHP-DB] Help in passing multiple HTML form options to SQL query <-- Newbie

2001-10-28 Thread TorrentUK
Richard, Many thanks for that. I was reading about the for statement in a book earlier today and wondered if I could implement it in some way. Looks so simple now I've been shown how :) Thanks again. "Richard Chauvaux" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTE

[PHP-DB] Toronto php users group meeting.

2001-10-28 Thread Dariush
www.realsoftstudio.com ... News Release ... PHP User Group Meeting Monday, Oct.29 at 7pm-10pm PHP SPINAL INJECTION TUTORIAL - When : Monday, Oct.29 at 7pm-10pm Where: Velocet Communications Inc. 210 Dundas street East (At Univ