RE: [PHP-DB] Drop down list

2002-01-30 Thread Niklas Lampén
1. Do query 2. Loop thru query results and write HTML for dropdown I think you should know atleast the basics of SQL + HTML before asking stuff here. There are whole lot of tutorials around the net. Niklas -Original Message- From: B.J.Rumsey [mailto:[EMAIL PROTECTED]] Sent: 30.

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-30 Thread DL Neil
Etienne, Well i hope someone will be able to give me a solution... Here s my problem: I'm working with a hudge mysql table (about 15 columns and 100 rows...) in fact i ve got to count the number of couples `ncompte`/`naffaire` in the table and finaly calculate the number of couples

Re: [PHP-DB] RE: ensuring unique field value in MySQL using PHP

2002-01-30 Thread Michael Waples
Dl Neil wrote: Janet, MySQL (and indeed all multi-user databases) has a feature called Locking. What this means is that whilst many users/clients may access a database, apparently simultaneously, when one (or more) is updating the data in some way, everyone else is kept locked-out for

Fw: [PHP-DB] Drop down list

2002-01-30 Thread George Lioumis
- Original Message - From: George Lioumis To: B.J.Rumsey Sent: Wednesday, January 30, 2002 11:47 AM Subject: Re: [PHP-DB] Drop down list Try the following: ?php $option_block = ; $get_list = select * from table_name; $res = mysql_query($get_list) or die (mysql_error()); while

Re: [PHP-DB] Date operations.

2002-01-30 Thread DL Neil
Garry, CREATE TABLE breeding ( rec SMALLINT(4) UNSIGNED AUTO_INCREMENT, sire SMALLINT(4) UNSIGNED, dam SMALLINT(4) UNSIGNED, paired DATE, split DATE, num_offspring TINYINT(1) ZEROFILL, PRIMARY KEY (rec) ); First, we define if a pair was breeding for

RE: [PHP-DB] Drop down list

2002-01-30 Thread Niklas Lampén
Well, true. :) There is a but: I think it's stupid to try to get the solution from others while the information is very easy to find by reading the manual. This issue is about _very_ basic stuff. If you do not know how to loop your query result, what in earth can you do with it? This is my

Re: [PHP-DB] Drop down list

2002-01-30 Thread Piotrek
OK. Someone else has already answered the question, so you could shut up and stop teaching us all how to deal with newbies. This way you'll help in a way - Original Message - From: Niklas Lampén [EMAIL PROTECTED] To: Php-DB [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 12:52 PM

RE: [PHP-DB] Drop down list

2002-01-30 Thread Niklas Lampén
I'm not allowed to answer arguments pointed to me? This is my way of dealing with newbies, and this is what I've learned to be the most powerfull way to really learn how to do things. If you don't like it - fine - handle them how you like. Niklas -Original Message- From: Piotrek

[PHP-DB] Connect to DB2-win2k through PHP4-Linux

2002-01-30 Thread Jerry
Hi, I have a windows 2000 Database Server with IBM DB2 V7.2 on it. I have a Web Server with Linux-Apache-PHP 4 on it (but not XWindow or any graphical interface...). On the web server, I want to run a PHP page to connect to the IBM DB2 Database on the win2k server. 1. Do I need to install DB2

RE: [PHP-DB] Drop down list

2002-01-30 Thread Rick Emery
First conect to DB $result=mysql($DBname,SELECT * FROM table; print SELECT name = artist; while( list($artist_id,$name) = mysql_fetch_array($result) ) { print OPTION value=\$artist_id\$name/OPTION\n; } print /SELECT; -Original Message- From: Julius Dlugolinsky [mailto:[EMAIL

RE: [PHP-DB] same connection to access two different database?

2002-01-30 Thread Andrew Hill
Vincent, If you need to use just one connection against multiple databases, you should check out Virtuoso. Among other features it can act as a virtual database, where you link multiple heterogenous database tables through it and then can treat them as one transparent schema from a single ODBC

[PHP-DB] MySQL Connection Class

2002-01-30 Thread jas
I know this may seem a little vague but I would like to know where a good tutorial on creating database connection class files would be. I have been looking and as of yet I have not found one that deals specifically with this question. Thanks in advance. Jas -- PHP Database Mailing List

Re: [PHP-DB] MySQL Connection Class

2002-01-30 Thread Dave Richardson
A number of connection classes and abstraction toolkits already exist. Your PHP 4.x install probably came with PEAR's DB.php abstraction layer. Save yourself the trouble perhaps? jas said: So all I would need to do is create a file named db_connection.php3 and put in the functions

Re: [PHP-DB] MySQL Connection Class

2002-01-30 Thread jas
Ok just to clear it up... our server is not running php4 unfortunately. =) Dave Richardson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... A number of connection classes and abstraction toolkits already exist. Your PHP 4.x install probably came with PEAR's

RE: [PHP-DB] MySQL Connection Class

2002-01-30 Thread Gurhan Ozen
Jas, I can't know whether or not that's right for you. It all depends on what you need to do.. If you only have one database connection with one userid/pass combination, then yes it might be the solution you are looking for. But if you want to be able to reuse your code for different types of

Re: [PHP-DB] MySQL Connection Class

2002-01-30 Thread jas
Yes it does, thanks... now that I have a better understanding of classes now I just need to write one. Thanks again. jas Gurhan Ozen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Jas, I can't know whether or not that's right for you. It all depends on what you

[PHP-DB] request and response objects?

2002-01-30 Thread Matthew Crouch
basically a yes or no question my brother wants me to ask: Does PHP support these objects? If not, Can they be faked? -- 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

Re: [PHP-DB] request and response objects?

2002-01-30 Thread Razorfish
see PHP's support of cURL / libcurl. it's do-able. basically a yes or no question my brother wants me to ask: Does PHP support these objects? If not, Can they be faked? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

[PHP-DB] newbie question: request response

2002-01-30 Thread Luke Crouch
Does PHP have built-in support for using request and response objects? Thanks, -L -- 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] Select statement only returns 1 record

2002-01-30 Thread Todd Williamsen
I am trying to get data from two columns, FirstName and Last name and displaying all the records LastName, FirstName in a drop down menu. The weird thing is that it only displays one record. I thought the table was hosed, but its not. I tried it through another database and still doesn't work.

Re: [PHP-DB] Select statement only returns 1 record

2002-01-30 Thread Miles Thompson
Check the manual for the mysql_fetch_array() function, it shows you how to extract data from $result. You will use the while loop (as shown in the manual's example) to fill your combo box / selct list /drop down menu, whatever we're calling that creature today. Miles At 12:45 PM 1/30/2002

RE: [PHP-DB] Select statement only returns 1 record

2002-01-30 Thread Rick Emery
? $db = mysql_connect($dbserver, $dbuser, $dbpass); mysql_select_db($dbname,$db); $sortby = name ASC; $sql=SELECT * FROM webl_players ORDER BY $sortby; $result=mysql_query($sql,$db); print select name=canidate; while( $row = mysql_fetch_array($result) ) { $FirstName = $row['FirstName'];

Re: [PHP-DB] Select statement only returns 1 record

2002-01-30 Thread biorn
You will need to put the option tag in a loop to get all of the records in the table. select name=canidate (this can go anywhere but in while loop) ? $db = mysql_connect($dbserver, $dbuser, $dbpass); mysql_select_db($dbname,$db); $sortby = name ASC; $sql=SELECT * FROM webl_players ORDER BY

[PHP-DB] Help needed with php and db2

2002-01-30 Thread Stephanie Workman
Good day all, I am new to php and lucky me my boss has asked me to do a 'proof of concept' with php against IBM DB2. Our DB2 database resides on an OS/390 system. I'm just trying to figure out at this point if php can actually connect to our database on the OS/390. I've read about ODBC

RE: [PHP-DB] Select statement only returns 1 record

2002-01-30 Thread Todd Williamsen
Nope, that doesn't work -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 1:01 PM To: 'Todd Williamsen'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Select statement only returns 1 record ? $db = mysql_connect($dbserver, $dbuser, $dbpass);

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-30 Thread Etienne DURAND
thx a lot for your answer, in fact i only have to return one of the 15 datas, so it makes one column... anyway, i already coded a solution with a while. My question was just to know if it was possible to do it without repeating 100 times the same processing. In fact i begin to believe that

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-30 Thread DL Neil
Bon soir Etienne, Like I say, Inverting an array is a chore, it's far easier to invert the pointers... but if you must do it:- For loop to control the first dimension using $i For loop to control the second dimension using $j $temp = $array[ $i ][ $j ]; $array[ $i ][ $j ] = $array[ $j

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-30 Thread Etienne DURAND
Bonsoir chef;o) thx again for helping me In fact i think the solution you gave me isn t not much faster as the while loop i use for the moment... and the execution speed is my only problem... well in fact i think i haven t be very clear with the goal i need to get. let me detail this to

Re: [PHP-DB] storing and retrieving arrays in mysql

2002-01-30 Thread Corey Eiseman
Hi, thanks for the suggestions. Peter, I definitely think your second solution, the one you said you are probably going to upgrade to, is very clean: adding another table between categories and subcategories that defines relationships between the two. it seems like it will be much easier to code

Re: [PHP-DB] request and response objects?

2002-01-30 Thread Paul DuBois
At 12:30 -0600 1/30/02, Matthew Crouch wrote: basically a yes or no question my brother wants me to ask: Does PHP support these objects? If not, Can they be faked? What, like in Java servlets/JSP pages? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

RE: [PHP-DB] drop down list

2002-01-30 Thread Beau Lebens
apologies for answering such an already-over-answered question, but i feel that no-one has given a particularly *good* answer, so i'll add mine to the list. I use this function (as well as a couple others which do similar things for all form elements; // Creates an HTML select box of values. //

[PHP-DB] Problem in editing a record

2002-01-30 Thread Miguel A.Galván
Hi ... I´m writing a code in order to update daily activities, these activities are going to be saved in 3 daily records (depending of the schedule of workers and their session id´s). I´ve already got records registered in my DB ,but the problem comes when i´m trying to edit these records to add

[PHP-DB] re: newbie question: request response

2002-01-30 Thread Oliver Cronk
No (not out of the box anyway) BUT the beauty of PHP is its much simpler than JSP or ASP's server.response() server.request() methods (sorry if thats not the exact syntax - I haven't done huge amounts of ASP/JSP work lately), in most cases you simply output the data (i.e. print / echo something;)

[PHP-DB] MSSQL Query - Unicode data in a Unicode-only collation or ntext data cannot be sent

2002-01-30 Thread sql
Getting this error: Warning: MS SQL message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16) in C:\webroot\test.php on line 13 Warning: MS SQL: Query failed in C:\webroot\test.php on

[PHP-DB] Selct show certain num records ?

2002-01-30 Thread Dave Carrera
Hi All I know this has been covered here before but can someone please remind me how to selct just the 5 latest records in my db and show them in list form. Just like phpbuilder.com dose I thank you in advance for repeating this information. Dave C :-) -- PHP Database Mailing List

Re: [PHP-DB] Selct show certain num records ?

2002-01-30 Thread Shooter
$order=time desc; $sql=SELECT * from $table ORDER BY $order LIMIT 0,5 or die (Cant do sql $sql);; that would get the latest news sorted on the time. Neil - Original Message - From: Dave Carrera [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 5:54 PM Subject: