[PHP-DB] default-character-set problem

2002-11-06 Thread nikos
Hello there... I have a problem with sort order. I use greek and english characters. The manual says to put the following lines to my.cnf: [client] character-sets-dir=/usr/local/mysql/share/mysql/charsets default-character-set=greek i restart the demon but the problem still exist. I have 3.23.49

Re: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Jason Wong
On Tuesday 05 November 2002 05:47, Graeme McLaren wrote: Hi, Anyone know how I can use two mysql_fetch_array() functions similar to the code below? I've tried a few different ways but I keep getting Resource ID #4. I need to do this to retrieve an email address from one table and retrieve

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
I concur with Jason, but if restructuring is out of the question, just rearrange your queries like this: $query = SELECT Name, Address FROM users; $result = mysql_query($query); while($details = mysql_fetch_array($result)){ echo Name: $details[Name]; echo Address: $details[Address]; }

Re: [PHP-DB] Abstraction layer or not?

2002-11-06 Thread Philippe Saladin
I'm working on a new site, and I'm wondering whether to use an abstraction layer or not. I don't have any plans to switch DB system, but you never know what the future holds. I figure that there's no reason not to, but are there any down sides? Which abstraction layers are good?

Re: [PHP-DB] default-character-set problem

2002-11-06 Thread Tjoumaidis
You have to put the same under [server] Nikos wrote: Hello there... I have a problem with sort order. I use greek and english characters. The manual says to put the following lines to my.cnf: [client] character-sets-dir=/usr/local/mysql/share/mysql/charsets default-character-set=greek i restart

[PHP-DB] sort by date

2002-11-06 Thread Terry Romine
I have two tables, one contains event information and the other dates that the event takes place: | id| int(11) | | PRI | 0 | auto_increment | | title | varchar(100) | YES | | NULL|| | location | varchar(100) | YES | | NULL

[PHP-DB] postgresql and php - my codes running twice?!?!?

2002-11-06 Thread Zac Hillier
Hi, Can anyone help I'm going mad with this... I'm using postgresql with php and writing a small login and sign-up system. Whena user wishes to sign-up Iwant to check there are not any other users with the same username, so I'm doing a select against the db with the requested username before

RE: [PHP-DB] sort by date

2002-11-06 Thread Snijders, Mark
if i get your point: 1 event can have more dates.. and you wanna show for each event just the first date... so you wanna show more from one table as the other one in that case you should try to use the left join !! so check the manual on left join -Original Message- From: Terry

Re: [PHP-DB] sort by date

2002-11-06 Thread Marco Tabini
Ok, going out on a limb here... have you tried something like select e.id, title, location, address, contact, category, event_time, urllink, descript, min(event_date) from eventTable e inner join dateTable d on e.id = d.id group by e.id ? Marco -- php|architect - The magazine

RE: [PHP-DB] sort by date

2002-11-06 Thread Snijders, Mark
why does everybody always gives the answers?? why not a hint, or where to search that they can learn something about it??? -Original Message- From: Marco Tabini [mailto:marcot;inicode.com] Sent: woensdag 6 november 2002 16:08 To: Terry Romine Cc: [EMAIL PROTECTED] Subject: Re:

RE: [PHP-DB] sort by date

2002-11-06 Thread Marco Tabini
My guess? Because we're all professionals at work and trying to solve a specific problem...since we're adults, I guess the learning part should be up to each of us--the information is certainly there even in the answer. :-) Marco -- php|architect - The magazine for PHP

Re: [PHP-DB] sort by date

2002-11-06 Thread Ignatius Reilly
Good point. Tell me and I forget, show me and I remember, involve me and I understand Ignatius - Original Message - From: Snijders, Mark [EMAIL PROTECTED] To: 'Marco Tabini' [EMAIL PROTECTED]; Terry Romine [EMAIL PROTECTED] Cc: [EMAIL

Re: [PHP-DB] sort by date

2002-11-06 Thread Jeffrey_N_Dyke
Agreed. we prove day in and out that the answers are only an email away...why would anyone go a different route. manual? whats a manual? There are some brilliant people on this list, but some equally intelligent people wrote some fine documentation.

Re: [PHP-DB] sort by date

2002-11-06 Thread Marco Tabini
Well, excuse me for being a bit cynical, but it's hard to be philosophical with a deadline hanging over your head. It's true that most of the questions can be answered by looking at the manual, but you also have to assume the possibility that the person who's asking them has a real and immediate

RE: [PHP-DB] sort by date

2002-11-06 Thread Hutchins, Richard
Just to weigh in on the tail end here, a FAQ of the top N items would be nice. But I have to say, I use the archives a lot before I post to the list. The archives contain the answers to most questions out there. If subscribers to this list checked the archives to see if their answer is there, then

Re: [PHP-DB] sort by date

2002-11-06 Thread Terry Romine
Thanks. My error seemed to be just in the group declaration. Comparing yours and mine with slight modifications to yours that eventually worked as desired: yours: select e.id, title, min(event_date) as event_date from eventTable e, dateTable d where e.id = d.event_key group by e.id; mine:

RE: [PHP-DB] sort by date

2002-11-06 Thread Josh Johnson
I agree, but in regard to your last paragraph, you're assuming that they read your post and respond to it. Everybody's quick to answer simple redundant questions that every programmer *should* know the answer to, but higher level stuff seems to just get ignored. I'd hope in a high-frequency list

Re: [PHP-DB] sort by date

2002-11-06 Thread Peter Beckman
Hey, there are a lot of new people who are starting with PHP. We all are here to help people learn how to use PHP because we are all PHP fans and want the world to use PHP. register_globals is an issue that us more advanced folk know about and deal with on a regular basis. There are lazy people

RE: [PHP-DB] sort by date

2002-11-06 Thread Peter Beckman
Besides, if they don't search the archives and newsgroups and Google already, why would we believe they'd read the FAQ? Peter On Wed, 6 Nov 2002, Hutchins, Richard wrote: Just to weigh in on the tail end here, a FAQ of the top N items would be nice. But I have to say, I use the archives a lot

Re: [PHP-DB] sort by date

2002-11-06 Thread Terry Romine
I have a manual and use it plus lots of sample code to work through, but there are times when we hit a wall and a simple second set of eyes to spot what should be obvious is helpful. I appreciate having a forum to throw out a question and get a rapid response. I could have rewritten this

Re: [PHP-DB] sort by date

2002-11-06 Thread dwalker
What archive and how do I access it? -Original Message- From: Hutchins, Richard [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, November 06, 2002 10:50 AM Subject: RE: [PHP-DB] sort by date Just to weigh in on the tail end here, a FAQ of the top N items would

RE: [PHP-DB] sort by date

2002-11-06 Thread Hutchins, Richard
Go here: http://www.php.net/mailing-lists.php and scroll down to find the archive for your type of question. Just click and search away - no subscription necessary. Lots of good help in there if you're diligent. -Original Message- From: dwalker [mailto:dwalker;healthyproductsplus.com]

Re: [PHP-DB] sort by date

2002-11-06 Thread Peter Beckman
This is how you'd find it in the future. It's fairly simple. http://php.net/ -- Mailing Lists -- Databases and PHP archive link YES OR -- Databases and PHP Newsgroup link Yes Archives: http://marc.theaimsgroup.com/?l=php-db Newsgroup: news://news.php.net/php.db

Re: [PHP-DB] sort by date

2002-11-06 Thread Maxim Maletsky
Great! But, many people cannot *understand* the manuals for their own reasons, that is why they ask - they hope to get some sample code. Shall we? -- Maxim Maletsky [EMAIL PROTECTED] Peter Beckman [EMAIL PROTECTED] wrote... : Hey, there are a lot of new people who are starting with PHP.

[PHP-DB] Question

2002-11-06 Thread Chris Payne
Hi there everyone, Why are so many attachments coming in to the list? Hopefully it's not because somebody has a virus and is infecting people who open them. So don't open attachments unless you are expecting something. Are there any plans to make PHP for windows a full blown programming

Re: [PHP-DB] sort by date

2002-11-06 Thread Maxim Maletsky
Peter Beckman [EMAIL PROTECTED] wrote... : Besides, if they don't search the archives and newsgroups and Google already, why would we believe they'd read the FAQ? There are already lots of FAQs, but even you who argue about that do not know much aboiut. So, an FAQ whether gets incorporated

Re: [PHP-DB] Question

2002-11-06 Thread Marco Tabini
Well, you can already do that--just download and install the CGI version. Unless, of course, you meant that you want to write Windows GUI applications, in which case I think someone is working on something like that with PHP-GTK. Oh, the attachments are either quoted messages or patches, for the

RE: [PHP-DB] Question

2002-11-06 Thread Josh Johnson
This isn't the place for discussions of php development, I think php-dev is what you want... but ah, PHP is a full-blown programming language, even under widnows. http://www.php.net/manual/sv/features.commandline.php -- check this page out You can write shell scripts with it, associate windows

Re: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Graeme McLaren
Josh, Thank you for reply. Thank you to everyone else who replied to my email also. I solved the problem shortly after posting my question, I've now got a massive SQL query which does the trick. I was interested when you replied and part of it read: Just remember that you can only work with

[PHP-DB] RE: Question - thanks

2002-11-06 Thread Chris Payne
Hi there everyone, Thanks for the response to my question - both the attachments and PHP as a full blown dev language. I know the latter isn't really for this group, but this is the best PHP group I have found and the only one I write in regularly. Thanks again Chris -- PHP Database Mailing

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
In my experience, (I haven't checked the docs just yet to figure out exactly why), you can only work with one result id at a time. Every time you call mysql_query, it resets the result id (I think it frees the result id automatically so you can send another query before getting the new result id),

Re: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread 1LT John W. Holmes
That's not true. You can assign them to different variables and it works fine. $r1 = mysql_query(select * from main limit 1) or die(mysql_error()); $r2 = mysql_query(select * from apft limit 1) or die(mysql_error()); $row1 = mysql_fetch_array($r1); $row2 = mysql_fetch_array($r2);

[PHP-DB] forum test

2002-11-06 Thread Seabird
Hi everyone, I just uploaded my forum and would like to have it field tested by everyone. It'll prob still have some bugs in there. http://seabird.jmtech.ca go to website and then click on forum. please ignore the login in the left top for now, Jacco -- http://seabird.jmtech.ca Attitude is

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
:) see why I love mailing lists! :) It must have been their logic then, I respectfully retract everything I said, sorry Graeme! Why do I have to work, I could spend my days researching this stuff before I post! Thanks John! -- Josh -Original Message- From: 1LT John W. Holmes

Re: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Ignatius Reilly
John is right. In fact one routinely calls two different $result(s) when coding nested loops: while( $details = mysql_fetch_array( $result ) ) { while ( $Email = mysql_fetch_array( $result2 ) ) .. } } when executing the next instance of your loop: while( $details = mysql_fetch_array(

RE: [PHP-DB] mysql_fetch_array() question

2002-11-06 Thread Josh Johnson
Of course, you can avoid that problem if you use a join, I guess it all comes down to code complexity vs SQL complexity. -- Josh -Original Message- From: Ignatius Reilly [mailto:ignatius.reilly;free.fr] Sent: Wednesday, November 06, 2002 1:38 PM To: Josh Johnson; '1LT John W. Holmes';

[PHP-DB] Imploding an array?

2002-11-06 Thread Aaron Wolski
Hey all, Can't seem to figure out why this won't work: $test = implode(,, $order_index[$i]); When I print_r() the variable I have values so I know that works. Any thoughts on this? Thanks. Aaron

Re: [PHP-DB] Imploding an array?

2002-11-06 Thread Rasmus Lerdorf
You sure you want [$i] on that? Is it a 2-dimensional array? On Wed, 6 Nov 2002, Aaron Wolski wrote: Hey all, Can't seem to figure out why this won't work: $test = implode(,, $order_index[$i]); When I print_r() the variable I have values so I know that works. Any thoughts on this?

Re: [PHP-DB] Imploding an array?

2002-11-06 Thread Jeffrey_N_Dyke
isn't $order_index[$i] only one index? or is it multi dimensional? Aaron Wolski

RE: [PHP-DB] Imploding an array?

2002-11-06 Thread Josh Johnson
Does $i have a value? -- Josh -Original Message- From: Rasmus Lerdorf [mailto:rasmus;php.net] Sent: Wednesday, November 06, 2002 2:16 PM To: Aaron Wolski Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Imploding an array? You sure you want [$i] on that? Is it a 2-dimensional array? On

RE: [PHP-DB] Imploding an array?

2002-11-06 Thread Aaron Wolski
Ok... This is the code I have setup: for ($i=0;$isizeof($order_index);$i++) { if ($delete[$i] == 1) { print_r($order_index[$i]); $str = implode(,,$order_index[$i]); echo

RE: [PHP-DB] Imploding an array?

2002-11-06 Thread Peter Beckman
Well, your code will do this: if delete[7] == 1, you will print_r($order_index[7]) which contains ??? Now from what you say $order_index[7] == 2627; That's just weird. Whatever it is you are doing is bad. Regardless, you could do this: $foo = preg_split(//,$order_index[7]); Now $foo is an

Re: [PHP-DB] forum test

2002-11-06 Thread Seabird
I'll look into it, thanx, can you access the jump-menu?? Forum should be all the way in the bottom. Jacco -- http://seabird.jmtech.ca Attitude is Everything! But Remember, Attitudes are Contagious! Is Yours worth Catching Mignon Hunter [EMAIL PROTECTED] wrote in message

[PHP-DB] MySQL password protection?

2002-11-06 Thread William Trappeniers
Hi all I was wondering if it is possible to protect my password to the MySQL-server from being in a PHP-script. Now I can't do that, so everybody who gets to see my php-sourcecode also can see my (not protected/not encrypted) password. How can I change this? Thanks, William --- William

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread 1LT John W. Holmes
I was wondering if it is possible to protect my password to the MySQL-server from being in a PHP-script. Now I can't do that, so everybody who gets to see my php-sourcecode also can see my (not protected/not encrypted) password. How can I change this? You can't, unless you want to put it in

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread SELPH,JASON (HP-Richardson,ex1)
actually you can make a .php file with your connection info, include it in your .php files at the top and encrypt that one file (they don't need to see it anyway). use a php encoder for the file with your login info in it. -Original Message- From: 1LT John W. Holmes

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Steve Cayford
You could put it anywhere. Stick it in a text file somewhere, fopen() and read the file for the password. Or keep it in a php script outside of the web root if that's the issue, then just include() it when you need to. Of course any file you put it in will have to be readable by whatever user

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread 1LT John W. Holmes
Are you sure you can include an encoded file into a non-encoded one? I had forgotten about this option, but if you can find a worthwhile compiler/encoder/etc, then that's a solution. ---John Holmes... - Original Message - From: SELPH,JASON (HP-Richardson,ex1) [EMAIL PROTECTED] To: '1LT

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Marco Tabini
Make sure that the encoder you use actually makes string unreadable. Otherwise, you can use a simple trick, like for example XORing the whole string with FF or something similar. -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to

[PHP-DB] Record IDs: Numeric or String??

2002-11-06 Thread Monty
Is it more efficient to store record IDs in a MySQL database as an Integer or a String? I like string IDs better because you can create meaningful names, but, not sure if this means the DB has to work harder or not. Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] Record IDs: Numeric or String??

2002-11-06 Thread Marco Tabini
Numeric IDs are probably a bit faster--although if properly indexed not by much--plus you can use self-numbering columns with them. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Peter Beckman
And make sure you make sure the webserver will not SERVE that file!!! You see the source, see that you are fopening the file, I'll find it on your system and get it from the web server and I have your password! Make sure the file is NOT in the document root that the web server serves from. You

Re: [PHP-DB] Record IDs: Numeric or String??

2002-11-06 Thread Peter Beckman
Always use ints. Also, make sure you actually need an INT before using it: Max Value Unsigned Integer: 4.3 billion or so Unsigned MediumInt: 16.7 million unsigned SmallInt: 65,535 unsigned TinyInt: 255 If you'll only ever have 300,000 rows in a table, use a mediumint.

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Josh Johnson
The standard apache install filters anything named .ht*. on the web tree. -- Josh -Original Message- From: Peter Beckman [mailto:beckman;purplecow.com] Sent: Wednesday, November 06, 2002 6:44 PM To: Steve Cayford Cc: [EMAIL PROTECTED]; William Trappeniers Subject: Re: [PHP-DB] MySQL

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Josh Johnson
Also, you can limit access to a specific table in a specific database for a specific user, if it makes sense in your application. -- Josh -Original Message- From: Peter Beckman [mailto:beckman;purplecow.com] Sent: Wednesday, November 06, 2002 6:41 PM To: William Trappeniers Cc: [EMAIL

Re: [PHP-DB] forum test

2002-11-06 Thread Bob Lockie
Seabird wrote: I'll look into it, thanx, can you access the jump-menu?? Forum should be all the way in the bottom. The jump menu doesn't work. I think you nad a 'name' field for each option... of your select... box. Jacco -- http://seabird.jmtech.ca Attitude is Everything! But Remember,

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Dave Smith
One thing I do with Postgres that I'm not sure MySQL supports is Kerberos5 authentication. This way, a user logs in (and they have a user account on the DB) and I use their remote user name and their Kerberos ticket to authenticate them to the DB. That works without having to store a password

[PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Gavin Amm
Hi, I'm trying to call a script with the ?= after the php script name in the URL, but can't seem to pick up the variable to use in my script... any help would be greatly appreciated :) I'm calling the script with this url: http://localhost/Data/test/dbconnect2c.php?id=TestPage The section of

RE: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Beau Lebens
did you try echoing the value of $id after you have assigned it? you may find it's because you aren't connected to your database or something and also, i am assuming that you are using a recent install/verison of PHP, because $_GET wasn't available until the last few releases. beau //

RE: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread John W. Holmes
I'm trying to call a script with the ?= after the php script name in the URL, but can't seem to pick up the variable to use in my script... any help would be greatly appreciated :) I'm calling the script with this url: http://localhost/Data/test/dbconnect2c.php?id=TestPage The section of

RE: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Gavin Amm
i wrote a really basic script sucessfully to echo the url variable to the screen... will go from there. thanks beau. EXCELLENT :) The single quotes around the $id variable in the select statement worked wonderfully. thanks John. Gav -Original Message- From: John W. Holmes

Re: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Tony72284
Well, first of all, you have to connect to the database. ?php $db_server = localhost; // Usual server. :P $db_login = USERNAME; $db_pass = USERPASS; mysql_connect($db_server,$db_login,$db_pass); ? And, its not always nesecary to have to type in $_GET['id'] to

[PHP-DB] FW: php J2EE .NET

2002-11-06 Thread Peter Lovatt
Hi There is an article on sitepoint.com about benchmarking J2EE and .NET and some controversy over the result http://www.sitepoint.com/newsletters/viewissue.php?fid=3id=3issue=52 Does anybody have experience of php/MySql in comparison with either of the above in terms of efficiency or ultimate

RE: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Gavin Amm
Hi, For some reason the page worked the 1st few times, now I get the error message (after making no changes to the code from when it worked...): (line 5 references the $db = mysql_co... line of code) Warning: Unknown MySQL Server Host 'mysql.db.*.net.au' (2) in

RE: [PHP-DB] Warning - newby question -- $_GET

2002-11-06 Thread Peter Beckman
Make sure DNS is working and mysql.db.*.net.au resolves. Better yet, use the IP address unless absolutely necessary to use the hostname. Peter On Thu, 7 Nov 2002, Gavin Amm wrote: Hi, For some reason the page worked the 1st few times, now I get the error message (after making no

Re: [PHP-DB] Archiving A Database

2002-11-06 Thread Peter Beckman
Do you need to archive it forever? Do you need live access to it? If you just need to archive it, read the man page for mysqldump. You can dump specific rows to a file, rename that file dump.2002.05.24, compress it with gzip, and voila, you have all of your data readily available, easily

Re: [PHP-DB] FW: php J2EE .NET

2002-11-06 Thread Peter Beckman
Well, I know from experience this: PHP 3 and 4.various, sessions enabled on every page (using DB to store) MySQL 3.23.various Apache 1.2.various 300,000 users in the DB 2600 dynamic pages No images or static multimedia content (on this server) PC, Dual 800Mhz 1GB Ram 4 18GB drives,

[PHP-DB] Select Fields

2002-11-06 Thread Tyler Whitesides
Hi, Sorry if this is ametuer, but I have been staring at this code for so long, trying to find out why my selection fields are gathering values, and I cant find the problem. Thanks, Tyler -- ? include './include/vars.php'; include './include/dbconnect.php'; ? html head title?= $title

Re: [PHP-DB] Select Fields

2002-11-06 Thread David Smith
Tyler, You probably need one or two of the following: 1. Put single-quotes around case in your SQL (where type like 'case') 2. Use wild-cards in your where statement (where type like '%case%') Good luck! --Dave On Wed, 2002-11-06 at 23:31, Tyler Whitesides wrote: Hi, Sorry if this is

Re: [PHP-DB] Select Fields

2002-11-06 Thread Tyler Whitesides
Thank you putting '%case%' instead of case worked! - Original Message - From: David Smith [EMAIL PROTECTED] To: Tyler Whitesides [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, November 06, 2002 10:47 PM Subject: Re: [PHP-DB] Select Fields Tyler, You probably need one or two

RE: [PHP-DB] sort by date

2002-11-06 Thread Lisi
There is a difference between a general, how do I do this question and a specific here's my code, I can't find the bug question. Sometimes people just need a quick answer specific to their code. Also, unfortunately, many times when people want to point to a resource they give the standard

[PHP-DB] oci function

2002-11-06 Thread Maziar
Hi everybody What should I do for useing OCI functions of oracle 9i in PHP4. I think I should recompile PHP with somthing but I don't know with what and how should I do this. I installed oracle 9i on SUSE linux 8.0. Best Regards Maizar -- PHP Database Mailing List (http://www.php.net/) To