[PHP-DB] PHP connect to mysql problem

2005-01-05 Thread Tsegaye Woldegebriel
Anybody help! I can't connect from my PHP to mysql using the following code: $link = mysql_connect("localhost", "root", "merkato") or die("Could not connect : " . mysql_error()); it replies with error: Could not connect : Client does not support authentication protocol requested by server; consi

Re: [PHP-DB] PHP query to mysql database returns emtpy data, but Query Browser shows records

2005-01-05 Thread graeme
Hi, You have: $query example = SELECT description from cpProducts where category='39 47 48 172' don't you want to add a logical operator such as OR, possibly AND $query example = SELECT description from cpProducts where category='39 OR 47 OR 48 OR 172' graeme. Jason Walker wrote: Here is the

Re: [PHP-DB] str_replace question

2005-01-05 Thread graeme
Hi, Wild guess but does the original WHILE AND have two spaces between the WHILE and the AND? us an echo before and after and count the number of spaces. But yes it would be possible to avoid this with the judicious appearance of an if statement. graeme Chris Payne wrote: Sorry if this already

[PHP-DB] PHP query to mysql database returns emtpy data, but Query Browser shows records

2005-01-05 Thread Jason Walker
  Here is the query:  function ReturnPackageDescriptions($pack, $cat, $hotcat, $hotid){      $comIB = $cat . " " . $pack . " " . $hotcat . " " . $hotid;   $catLength = strlen($comIB);   echo $catLength;   $query = "SELECT description from cpProducts whe

Re: [PHP-DB] str_replace question

2005-01-05 Thread Jason Wong
On Thursday 06 January 2005 09:38, Chris Payne wrote: > Iâm having a weird problem and Iâm not sure why, if I try to replace WHERE > AND with just WHERE it wonât do it, but if I try to replace WHERE or AND by > themselves it WILL do it, but I cannot replace BOTH of them from a single > string, is

[PHP-DB] str_replace question

2005-01-05 Thread Chris Payne
Hi there everyone, I’m having a weird problem and I’m not sure why, if I try to replace WHERE AND with just WHERE it won’t do it, but if I try to replace WHERE or AND by themselves it WILL do it, but I cannot replace BOTH of them from a single string, is something wrong below? $additionalsq

[PHP-DB] str_replace question

2005-01-05 Thread Chris Payne
Sorry if this already went through, my SMTP server was having problems. Hi there everyone, I’m having a weird problem and I’m not sure why, if I try to replace WHERE AND with just WHERE it won’t do it, but if I try to replace WHERE or AND by themselves it WILL do it, but I cannot replace BO

[PHP-DB] Re: $_GET of array variables

2005-01-05 Thread Yvonne Federowicz
Thank you very much for all the ideas. "Printing it out" and the "print_r( $_GET )" of all the incoming variables did it, along with some caffeine. In case any future people are interested, the array results from an HTML form multiple select box like: unknown on trunk

Re: [PHP-DB] $_GET of array variables

2005-01-05 Thread Jason Wong
On Thursday 06 January 2005 07:02, Jochem Maas wrote: > now lets sing together: "If in doubt print it out!" :-) Hey, you're using my trademark without my permission :) google > "If in doubt print it out" -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Inte

Re: [PHP-DB] $_GET of array variables

2005-01-05 Thread Jochem Maas
Jochem Maas wrote: in the script that recieve the form submission try adding the following lines to view the contents of the $_GET superglobal array. echo ''; print_r( $_GET ); tip for those pulling their hair out: PRINT_R() is your friend!!! ...sometimes referred to as the poormans debugger. no

Re: [PHP-DB] MySQL Auto PK

2005-01-05 Thread John Holmes
OOzy Pal wrote: Is it possible to have mysql at an ID as 20050105-1 as (MMDD-1), -2, etc. automatically? No. But you can always just use SELECT CONCAT(date_column,'-',pk_column) AS fixed_id ... if you _really_ need something like this. Or just join them together in PHP. -- ---J

Re: [PHP-DB] MySQL Auto PK

2005-01-05 Thread Jochem Maas
OOzy Pal wrote: Dears, Is it possible to have mysql at an ID as 20050105-1 as (MMDD-1), -2, etc. probably, possibly, maybe. take your pick. as Martin Norland already pointed out to someone else; this is not [EMAIL PROTECTED] (that beauty of a comment is forever burned into my neo-cortex

Re: [PHP-DB] Display records on form

2005-01-05 Thread Jochem Maas
I'm resending this email as it does seems to have made its way onto the list (as far as I can see) - apologies if this is a double post. anyone else interested in recieving the pagination function I mention below can mail me offlist. here is the original reply: David Ziggy Lubowa wrote: first

Re: [PHP-DB] $_GET of array variables

2005-01-05 Thread Jochem Maas
in the script that recieve the form submission try adding the following lines to view the contents of the $_GET superglobal array. echo ''; print_r( $_GET ); echo ''; once you see the structure it should be clear what array index key(s) you should be using to get to the relevant values. PS - Ma

Re: [PHP-DB] $_GET of array variables

2005-01-05 Thread Matt M.
> $_GET['simplevariable'] but am not having much luck with anything like: > > $_GET["arrayvariable$a"] (1-dimensional array) or > $_GET["arrayvariable$a$b"] (2-dimensional array) > > (I've tried several other odd syntaxes such as > $_GET["arrayvariable[$a][$b]"]. Also it's not an \" situation.)

[PHP-DB] $_GET of array variables

2005-01-05 Thread Yvonne Federowicz
Hello, I am new to PHP 4, and have not been able to find the answer to this online or through experimentation yet. I have array variables from html forms that I am passing back into the php in order to enter into MySQL. I have had no trouble with simple variables using $_GET['simplevariable']

[PHP-DB] MySQL Auto PK

2005-01-05 Thread OOzy Pal
Dears, Is it possible to have mysql at an ID as 20050105-1 as (MMDD-1), -2, etc. OOzy = Regards, OOzy What is the purpose of life? __ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com

Re: [PHP-DB] Re: MySQL version issue

2005-01-05 Thread Doug Thompson
I isn't my intention to start a peeing contest, but if *you* get rid of the chip and actually read the manual excerpt, the equivalent SQL statements it cites are very definitely available in mysql 3.xx.xx. DT Mark Benson wrote: Doug, read my e-mail again, specifically the second and third paragra

[PHP-DB] Re: MySQL version issue

2005-01-05 Thread Mark Benson
Doug, read my e-mail again, specifically the second and third paragraphs about what *version* of MySQL my host's server is using, then look at the manual entry again (specifically the first line you quoted). The _mysql manual_ says... "If you specify the ON DUPLICATE KEY UPDATE clause (new in M

[PHP-DB] select text from a text file

2005-01-05 Thread Ed
Happy new year folks! The titlemight make this seem like an easy to answer question However here's the complicated bit (well for me anyway). In my text file that is written to by the users in a chatroom it looks like this: nickname||color||what the user is saying||user how can i make it so th