[PHP-DB] MySQL Error 1251 / phpMyAdmin

2005-02-07 Thread GH
I just installed phpMyAdmin 2.6.1 on my Windows Laptop with PHP
Version 4.3.10  [Build Date  Dec 14 2004 17:46:48] and mySql 4.1.8

I am receiving the enclosed error  when I attempt to go into
phpMyAdmin and do not know how to solve the issue...

Any assistance would be greatful.

Thank you
Gary


//## ERROR RECIEVED //

Welcome to phpMyAdmin 2.6.1

phpMyAdmin tried to connect to the MySQL server, and the server
rejected the connection. You should check the host, username and
password in config.inc.php and make sure that they correspond to the
information given by the administrator of the MySQL server.

Error 
MySQL said:  

#1251 - Client does not support authentication protocol requested by server

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: MySQL Error 1251 / phpMyAdmin

2005-02-07 Thread GH
I am still new to the PHP scene could you tell me how I rebuild the
PHP with the client library...


On Mon, 07 Feb 2005 12:20:26 -0500, Michael Stassen
[EMAIL PROTECTED] wrote:
 
 You have mysql 4.1.8, but your php was built with the library for an earlier
 version, which, as the error message says, doesn't support the new, more
 secure authentication protocol.  Your choices are to tell mysql to use the
 older, less-secure protocol, or build a copy of php using your current mysql
 client library.  See the manual for more
 http://dev.mysql.com/doc/mysql/en/old-client.html.
 
 Michael
 
 GH wrote:
 
  I just installed phpMyAdmin 2.6.1 on my Windows Laptop with PHP
  Version 4.3.10  [Build Date  Dec 14 2004 17:46:48] and mySql 4.1.8
 
  I am receiving the enclosed error  when I attempt to go into
  phpMyAdmin and do not know how to solve the issue...
 
  Any assistance would be greatful.
 
  Thank you
  Gary
 
 
  //## ERROR RECIEVED //
 
  Welcome to phpMyAdmin 2.6.1
 
  phpMyAdmin tried to connect to the MySQL server, and the server
  rejected the connection. You should check the host, username and
  password in config.inc.php and make sure that they correspond to the
  information given by the administrator of the MySQL server.
 
  Error
  MySQL said:
 
  #1251 - Client does not support authentication protocol requested by server
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Update Query with special conditions.

2004-11-24 Thread GH
I am curious about doing something simular to this... does anyone have an idea


On Wed, 24 Nov 2004 00:43:32 -0500, list 123. list wrote:
 Using mySQL 4.0, I would like to know how I can code a query that will change 
 the value of Participants.Active from Y to N is for three or more CONSECUTIVE 
 sessions they have Attendance.Present = 'No'?
 
 The Attendance Table has Attendance.Session which coresponds to 
 Sessions.SessionID and Attendance.Participant coresponds to 
 Participants.Part_ID;
 
 To assist, I have shown you the data of the Sessions and the descriptions of 
 Attendance, Participants, Attendance
 
 Thanks
 G
 
 mysql describe Participants;
 +---+---+--+-+-++
 | Field | Type  | Null | Key | Default | Extra  |
 +---+---+--+-+-++
 | Part_ID   | smallint(10) unsigned |  | PRI | NULL| auto_increment |
 | LastName  | varchar(30)   |  | PRI | ||
 | FirstName | varchar(30)   |  | PRI | ||
 | DOB   | date  | YES  | | NULL||
 | Sex   | enum('M','F') |  | | M   ||
 | Phone1| varchar(12)   |  | MUL | ||
 | Phone2| varchar(12)   | YES  | | NULL||
 | Notes | text  |  | | ||
 | Facesheet | enum('Have','Need')   |  | | Need||
 | Active| set('Y','N')  |  | | Y   ||
 +---+---+--+-+-++
 10 rows in set (0.00 sec)
 
 mysql describe Attendance;
 +-+--+--+-+-++
 | Field   | Type | Null | Key | Default | Extra  |
 +-+--+--+-+-++
 | AttID   | int(4)   |  | PRI | NULL| auto_increment |
 | Session | int(2)   |  | MUL | 0   ||
 | Participant | int(2)   |  | | 0   ||
 | Present | enum('Yes','No') |  | | Yes ||
 +-+--+--+-+-++
 4 rows in set (0.00 sec)
 
 mysql describe Sessions;
 +-+-+--+-+++
 | Field   | Type| Null | Key | Default| Extra  |
 +-+-+--+-+++
 | SessionID   | int(2) unsigned |  | PRI | NULL   | auto_increment |
 | SessionDate | date|  | PRI | -00-00 ||
 +-+-+--+-+++
 2 rows in set (0.03 sec)
 
 mysql select * from Sessions;
 +---+-+
 | SessionID | SessionDate |
 +---+-+
 | 1 | 2004-10-30  |
 | 2 | 2004-11-06  |
 | 3 | 2004-11-13  |
 | 4 | 2004-11-20  |
 | 5 | 2004-12-04  |
 | 6 | 2004-12-11  |
 | 7 | 2005-01-08  |
 | 8 | -00-00  |
 | 9 | 2005-01-29  |
 |10 | 2005-02-05  |
 |11 | 2005-02-12  |
 |12 | 2005-02-26  |
 |13 | 2005-03-05  |
 |14 | 2005-03-12  |
 |15 | 2005-03-19  |
 |16 | 2005-04-02  |
 |17 | 2005-04-09  |
 |18 | 2005-04-16  |
 |19 | 2005-04-23  |
 |20 | 2005-05-07  |
 |21 | 2005-05-14  |
 |22 | 2005-05-21  |
 +---+-+
 22 rows in set (0.05 sec)
 
 +-+
 | Tables_in_AHRC  |
 +-+
 | Attendance  |
 | Participants|
 | ProgressNotes   |
 | Sessions|
 | Staff   |
 | StaffAttendance |
 +-+
 6 rows in set (0.00 sec)
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Optimize Query Output

2004-11-19 Thread GH
I have the following query:

SELECT A.`AttID` , S.`SessionDate` , P.LastName, P.FirstName, A.`Present`
FROM `Attendance` A, Sessions S, Participants P
WHERE S.SessionID = A.`Session` AND P.Part_ID = A.`Participant`
GROUP BY P.LastName, P.FirstName, A.Present, A.AttID

I would like to have the output to have the P.LastName and P.FirstName
values only shown once and the rest of the output printed...

So instead of something like:

+---+-+-+---+-+
| AttID | SessionDate | LastName| FirstName | Present |
+---+-+-+---+-+
| 1 | 2004-10-30  | Apple | Robert  | Yes |
|11 | 2004-11-06  | Apple | Robert  | Yes |
|31 | 2004-11-13  | Apple | Robert  | Yes |
| 2 | 2004-10-30  | Bravo | Lisa   | Yes |
|32 | 2004-11-13  | Bravo | Lisa   | Yes |
|12 | 2004-11-06  | Bravo | Lisa   | No  |
| 3 | 2004-10-30  | Beta   | Elaine| Yes |
|13 | 2004-11-06  | Beta   | Elaine| Yes |
|14 | 2004-11-06  | Delta | Alexander | Yes |
|35 | 2004-11-13  | Delta | Alexander | Yes |



To have it look like:

+-+---+---+-+-+
| LastName| FirstName | AttID | SessionDate | Present |
+-+---+---+-+-+
| Apple | Robert S. | 1 | 2004-10-30  | Yes |
|   |   |11|  2004-11-06 | Yes |
|   |   |31|  2004-11-13 | Yes |
| Bravo | Luz   | 2 | 2004-10-30  | Yes |
|  | |32|  2004-11-06 | No |
|   |   |12|  2004-11-13 | Yes |
| Beta   | Elaine| 3 | 2004-10-30  | Yes |
|  |   |13|  2004-11-06 | Yes |
| Delta  | Alexander |14 | 2004-11-06  | Yes |
|   |   |35|  2004-11-13 | Yes |
.

Please advise I am running on mySql 4.0

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Upgrading mySQL

2004-11-15 Thread GH
when I go to both 2.10 Upgrading MySQL
(http://dev.mysql.com/doc/mysql/en/Upgrade.html) and  2.10.2 Upgrading
from Version 4.0 to 4.1
(http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.0.html) it does
not tell me how to upgrade it only tells me about important changes
and recomendation. I am looking for a guide of what commands I need to
use and so forth. As I said in the inital mailing I made, I am a
newbie to Linux.

It also says that
It is a good idea to rebuild and reinstall the Perl DBD::mysql module
whenever you install a new release of MySQL. The same applies to other
MySQL interfaces as well, such as the PHP mysql extension and the
Python MySQLdb module.  [But now how to]


Please Assist...
Thank You.

On Sun, 14 Nov 2004 19:55:52 -0800, Ardilla Roja [EMAIL PROTECTED] wrote:
 this one will be usefull ...
 
 2.10.2 Upgrading from Version 4.0 to 4.1
 - http://dev.mysql.com/doc/mysql/en/Upgrading-from-4.0.html
 
 
 
 
 On Sun, 14 Nov 2004 09:30:49 -0500, GH [EMAIL PROTECTED] wrote:
  I would like to know how to upgrade mySql from 4.0 to 4.1?
 
  I am running mandrake 10
 
  I am using the preinstalled versions of both mySQL and PHP (php4).
 
  I am a newbie to Linux and am a bit nervous.
 
  Thanks.
  
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Upgrading mySQL

2004-11-14 Thread GH
I would like to know how to upgrade mySql from 4.0 to 4.1? 

I am running mandrake 10

I am using the preinstalled versions of both mySQL and PHP (php4).

I am a newbie to Linux and am a bit nervous.

Thanks.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Problem with an insert query

2004-11-13 Thread GH
Explain Bind Vars please... Thanks


On Sat, 13 Nov 2004 19:08:59 +, Simon Rees [EMAIL PROTECTED] wrote:
 You also appear to have a quote in the value that contains the word
 members'
 You will need to escape this or use bind vars.
 
 Simon
 
 
 
 On Saturday 13 November 2004 06:29, GH wrote:
  In my mySQL database I have the following tables:
  +-+
 
  | Tables_in_AHRC  |
 
  +-+
 
  | Attendance  |
  | Participants|
  | ProgressNotes   |
  | Sessions|
  | Staff   |
  | StaffAttendance |
 
  +-+
 
  I am trying to insert data in the ProgressNotes Table using the
  following query but it does not work. Can someone please assist? Thank
  You.
 
  INSERT INTO ProgressNotes
  (
  DateOfReport,
  NumPartReg,
  NumPartPresent,
  NumStaffPresent,
  NumVolPresent,
  TodaysActivities,
  DescribeSession,
  Interactions,
  Comments,
  Plans,
  Signed
   )
  VALUES (
  '1',
  Select Count(*) From Attendance WHERE Session = 1,
  Select Count(*) From Attendance WHERE Session = 1 AND Present =
  'Yes', Select Count(*) From StaffAttendance WHERE Session = 1 AND Present
  = 'Yes',
  '0',
  'Attempt to start program',
  'Due to the lack of completed paperwork between  and SITE, we
  were unable to complete the program as schedule. We informed the
  consumers of the situation.',
   'Understandably, the consumers were upset. The Dean (SR) was
  kind enough to try and help explain to our members that there was a
  communications problem that caused the paperwork not to be completely
  in place before we started the program. LL and I got the members'
  phone numbers so that we can advise them if we are canceled next week.
 
  One consumer, DSL, was being uncooperative with us through out the
  time we were in session. She was pouting and having an attitude with
  all who were there including: the parents of another consumer, Dean SR
  and  staff. I attempted to calm Ms. L down and stated that I was
  informed by MR that there might be a problem at 6:45PM on Friday.
  After the close of business hours on Friday. Ms. L stated on many
  occasions that M should of told her that we were not having class
  today. She called a couple of persons including a counselor at ZZZ, to
  which I was able to speak and explain the situation. I attempted to
  explain the entire situation and that we did not definitely know that
  they were not going to let us in to the room  until today. The
  counselor seemed to be understanding. I told her that we are expecting
  to run the program next week and that we would contact Ms. L if we are
  told that we can not.',
  'Everyone (Consumers, Parents and Staff) wishes to have the
  program by next week please help us get up and running.',
  'Attempt to start up the program next session.',
  'GMH, PgmLdr'
  );
 
  mysql describe ProgressNotes;
  +--+--+--+-+-+---+
 
  | Field| Type | Null | Key | Default | Extra |
 
  +--+--+--+-+-+---+
 
  | DateOfReport | int(2)   |  | PRI | 0   |   |
  | NumPartReg   | int(2)   |  | | 0   |   |
  | NumPartPresent   | int(2)   |  | | 0   |   |
  | NumStaffPresent  | int(1)   |  | | 0   |   |
  | NumVolPresent| int(2)   |  | | 0   |   |
  | TodaysActivities | varchar(255) |  | MUL | |   |
  | DescribeSession  | text |  | | |   |
  | Interactions | text |  | | |   |
  | Comments | text |  | | |   |
  | Plans| text |  | | |   |
  | Signed   | text |  | | |   |
 
  +--+--+--+-+-+---+
  11 rows in set (0.00 sec)
 
  [QUOTE PHPMYADMIN RESULTS]
 
  Database AHRC  - Table Participants  running on localhost
 
  Error
 
  There seems to be an error in your SQL query. The MySQL server error
  output below, if there is any, may also help you in diagnosing the
  problem
 
  ERROR: Unclosed quote @ 2040
  STR: '
  SQL: INSERT INTO ProgressNotes
  (
  DateOfReport,
  NumPartReg,
  NumPartPresent,
  NumStaffPresent,
  NumVolPresent,
  TodaysActivities,
  DescribeSession,
  Interactions,
  Comments,
  Plans,
  Signed
   )
  VALUES (
  '1',
  Select Count(*) From Attendance WHERE Session = 1,
  Select Count(*) From Attendance WHERE Session = 1 AND Present =
  'Yes', Select Count(*) From StaffAttendance WHERE Session = 1 AND Present
  = 'Yes',
  '0

[PHP-DB] Problem with an insert query

2004-11-12 Thread GH
In my mySQL database I have the following tables:
+-+
| Tables_in_AHRC  |
+-+
| Attendance  |
| Participants|
| ProgressNotes   |
| Sessions|
| Staff   |
| StaffAttendance |
+-+

I am trying to insert data in the ProgressNotes Table using the
following query but it does not work. Can someone please assist? Thank
You.

INSERT INTO ProgressNotes
(
DateOfReport,
NumPartReg,
NumPartPresent,
NumStaffPresent,
NumVolPresent,
TodaysActivities,
DescribeSession,
Interactions,
Comments,
Plans,
Signed
 )
VALUES (
'1',
Select Count(*) From Attendance WHERE Session = 1,
Select Count(*) From Attendance WHERE Session = 1 AND Present = 'Yes',
Select Count(*) From StaffAttendance WHERE Session = 1 AND
Present = 'Yes',
'0',
'Attempt to start program',
'Due to the lack of completed paperwork between  and SITE, we
were unable to complete the program as schedule. We informed the
consumers of the situation.',
 'Understandably, the consumers were upset. The Dean (SR) was kind
enough to try and help explain to our members that there was a
communications problem that caused the paperwork not to be completely
in place before we started the program. LL and I got the members'
phone numbers so that we can advise them if we are canceled next week.

One consumer, DSL, was being uncooperative with us through out the
time we were in session. She was pouting and having an attitude with
all who were there including: the parents of another consumer, Dean SR
and  staff. I attempted to calm Ms. L down and stated that I was
informed by MR that there might be a problem at 6:45PM on Friday.
After the close of business hours on Friday. Ms. L stated on many
occasions that M should of told her that we were not having class
today. She called a couple of persons including a counselor at ZZZ, to
which I was able to speak and explain the situation. I attempted to
explain the entire situation and that we did not definitely know that
they were not going to let us in to the room  until today. The
counselor seemed to be understanding. I told her that we are expecting
to run the program next week and that we would contact Ms. L if we are
told that we can not.',
'Everyone (Consumers, Parents and Staff) wishes to have the program
by next week please help us get up and running.',
'Attempt to start up the program next session.',
'GMH, PgmLdr'
);

mysql describe ProgressNotes;
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
+--+--+--+-+-+---+
| DateOfReport | int(2)   |  | PRI | 0   |   |
| NumPartReg   | int(2)   |  | | 0   |   |
| NumPartPresent   | int(2)   |  | | 0   |   |
| NumStaffPresent  | int(1)   |  | | 0   |   |
| NumVolPresent| int(2)   |  | | 0   |   |
| TodaysActivities | varchar(255) |  | MUL | |   |
| DescribeSession  | text |  | | |   |
| Interactions | text |  | | |   |
| Comments | text |  | | |   |
| Plans| text |  | | |   |
| Signed   | text |  | | |   |
+--+--+--+-+-+---+
11 rows in set (0.00 sec)

[QUOTE PHPMYADMIN RESULTS]

Database AHRC  - Table Participants  running on localhost

Error

There seems to be an error in your SQL query. The MySQL server error
output below, if there is any, may also help you in diagnosing the
problem

ERROR: Unclosed quote @ 2040
STR: '
SQL: INSERT INTO ProgressNotes
(
DateOfReport,
NumPartReg,
NumPartPresent,
NumStaffPresent,
NumVolPresent,
TodaysActivities,
DescribeSession,
Interactions,
Comments,
Plans,
Signed
 )
VALUES (
'1',
Select Count(*) From Attendance WHERE Session = 1,
Select Count(*) From Attendance WHERE Session = 1 AND Present = 'Yes',
Select Count(*) From StaffAttendance WHERE Session = 1 AND
Present = 'Yes',
'0',
'Attempt to start program',
'Due to the lack of completed paperwork between  and SITE, we
were unable to complete the program as schedule. We informed the
consumers of the situation.',
 'Understandably, the consumers were upset. The Dean (SR) was kind
enough to try and help explain to our members that there was a
communications problem that caused the paperwork not to be completely
in place before we started the program. LL and I got the members'
phone numbers so that we can advise them if we are 

Re: [PHP-DB] Re: [EMAIL PROTECTED] November 2, 2004

2004-11-02 Thread GH
However, when other countries are in trouble or need something... who
do they turn to? America

Therefore everyone in the world has an interest in what happens in the
american body politic just as Americans have an interest in what
happens to the British Prime Minister and in parts of the British body
politic.




On Tue, 02 Nov 2004 07:22:13 +, Lester Caine [EMAIL PROTECTED] wrote:
 Joseph Crawford wrote:
 
 Do we care? Realy? Unlikely. Maybe you should send your 'useful' info on
   a national mailinglist only.
 
  i am sorry but i do care, if you do not care about voting you dont
  care if the war comes to the US.
 
 There are many more of us who do not have the right to vote in the US,
 just as we do not have the right to claim our 3.5% guaranteed mortgage.
 Americans need to start thinking about OTHER countries rather than
 assuming that they can just bombard every list with 'relevant'
 information that is totally irrelevant to the rest of the world.
 
 THAT is one of the major reasons the rest of the world gets p*d of
 Americans ;)
 
 --
 Lester Caine
 -
 L.S.Caine Electronic Services
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: [EMAIL PROTECTED] November 2, 2004

2004-11-02 Thread GH
and by the way the main reason we have problems  in America 

  * People with out health insurance
  * No affordable housing
  * and a huge debt  
  * amongst others

is because we give aid to almost any country who asks for it and
allow them to take the American's jobs...

Just a thought


On Tue, 2 Nov 2004 03:04:10 -0500, GH [EMAIL PROTECTED] wrote:
 However, when other countries are in trouble or need something... who
 do they turn to? America
 
 Therefore everyone in the world has an interest in what happens in the
 american body politic just as Americans have an interest in what
 happens to the British Prime Minister and in parts of the British body
 politic.
 
 
 
 
 On Tue, 02 Nov 2004 07:22:13 +, Lester Caine [EMAIL PROTECTED] wrote:
  Joseph Crawford wrote:
 
  Do we care? Realy? Unlikely. Maybe you should send your 'useful' info on
a national mailinglist only.
  
   i am sorry but i do care, if you do not care about voting you dont
   care if the war comes to the US.
 
  There are many more of us who do not have the right to vote in the US,
  just as we do not have the right to claim our 3.5% guaranteed mortgage.
  Americans need to start thinking about OTHER countries rather than
  assuming that they can just bombard every list with 'relevant'
  information that is totally irrelevant to the rest of the world.
 
  THAT is one of the major reasons the rest of the world gets p*d of
  Americans ;)
 
  --
  Lester Caine
  -
  L.S.Caine Electronic Services
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] November 2, 2004

2004-11-01 Thread GH
Greetings:

  This is just a friendly reminder that if you are registered in the
United States to VOTE on November 2, 2004 (TOMORROW)

  Need to know where you vote?

 Please see the attached file (it is an image) that contains some information

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Lost in query... Trying to get output from query....

2004-10-11 Thread GH
Greetings:

 I am having a problem with trying to get data out of my mySql database.

I run my query which works fine and everything... 

I use: 

$admin_get_options_query_text = Select * from adminpage;

$admin_get_options_results_reference =
mysql_query($admin_get_options_query_text,$db_access) or die(Admin
Get Options: . mysql_error());

$admin_get_options_result =
mysql_fetch_assoc($admin_get_options_results_reference);


-

When I run the query in mysql directly the results are. 

mysql Select * from adminpage;
+-++--+
| adminpageid | file_name  | description  |
+-++--+
| 101 | nycalertstatus.php | Change New York City Threat Alert Status |
+-++--+
1 row in set (0.00 sec)



my problem is that I would like to get that output into my php
codeI would like to have something that goes like this for each
record..

The api# $adminpageid allows you to $description, and uses the file #file_name


can anyone please assist.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: [PHP] Lost in query... Trying to get output from query....

2004-10-11 Thread GH
Thank You Murray's suggestion worked


On Mon, 11 Oct 2004 11:20:57 -0400, John Nichel [EMAIL PROTECTED] wrote:
 GH wrote:
  Greetings:
 
   I am having a problem with trying to get data out of my mySql database.
 
  I run my query which works fine and everything...
 
  I use:
 
  $admin_get_options_query_text = Select * from adminpage;
 
  $admin_get_options_results_reference =
  mysql_query($admin_get_options_query_text,$db_access) or die(Admin
  Get Options: . mysql_error());
 
  $admin_get_options_result =
  mysql_fetch_assoc($admin_get_options_results_reference);
 
 If the query is going to return multiple rows, you need to loop thru the
 result set...
 
 while ( $admin_get_options_result =
 mysql_fetch_assoc($admin_get_options_results_reference) ) {
// do stuff with each row returned
 }
 
 --
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Dynamic pull down menus with PHP/Mysql

2004-10-07 Thread GH
For a project in college that I had once did using ColdFusion and
MSAccess (please dont kill me :)) I had the simular situation

What I did was when the First Drop Down was changed... it had an
onChange action or something of that nature (do not have my exact code
infront of me) that went to a JS function which sent the value to
another frame (window) you can use a hidden 1x1 iframe to conduct
this... it then returned the values to the other page via JS I
have to Dig for the code which unfortinately is buried at the
moment


On Tue, 5 Oct 2004 08:22:22 -0700, Ed Lazor [EMAIL PROTECTED] wrote:
  -Original Message-
  This may be a more javascript related topic, but it's also php/mysql.
  Apologies in advance if this is too far off topic.
 
  I'm trying to pull data from MySQL using PHP to sort the results into a
  form with a pull down menu. That works fine; I can do that.
 
  But I have a second pull down menu whose items need to display based on
  the item chosen from the first pull down menu.
 
  I can do two lists seperately, but I need the second pull down menu to be
  a result of the first, and I can't figure a way to do it in PHP without
  reloading the page, which I don't really want to do.
 
  Is this a javascript-dependent function, in that a js will have to make
  the call to the database via some sort of scripted php/mysql request? I
  really like to avoid javascript if possible, but I'm unsure there's an
  alternative.
 
 You're describing what I think is called Dynamic Options.  Doing a Google
 for javascript dynamic option or javascript dynamic select will pull-up
 a few examples.
 
 Most of these solutions will expect you to load all data into javascript
 arrays.  In other words, you don't have to reload the page, because all of
 the data is already present.
 
 This approach doesn't work well when dealing with large amounts of data.  If
 you're running into this, use javascript's window.opener feature.  It allows
 you to spawn a second window that retrieves data and sends it to the first
 window.
 
 -Ed
 
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: Convert plain text to HTML tagged text

2004-10-01 Thread GH
I have a question along this line... is it possible to have PHP do
more than one str_replace at the same time? or would I need to pass
through each time seperately? I.e I wasn to check for Line returns and
change it to p, i want to replace [c] with a special formating
tag etc...?

Thanks? 


On Wed, 29 Sep 2004 13:55:31 -0400, Felipe Alcacibar
[EMAIL PROTECTED] wrote:
 if the returnns are \n you only need nl2br(this \n test \n)... or
 preg_replace(/((\r|\n)|(\r\n|\n\r))/, br /, this \r\n test \r\n)...
 good luck...
 
 [EMAIL PROTECTED] escribió en el mensaje
 news:[EMAIL PROTECTED]
 cast.net...
 
 
  To the list:
 
  I've googled and searched the manual, but I'm still looking for a simple
 solution to a simple problem.
 
  I have a MySQL database of text stories in longtext MySQL fields. These
 stories have simple returns (\r) in them and no other formatting. I need to
 use these stories both for web and print production, so I need to be able to
 get the text out of MySQL via PHP and have those returns change to P tags.
 But I also need to keep those extra P tags out of the database file so the
 text can be exported and poured into a layout program.
 
  HTMLspecialchars and HTMLentities don't seem like the right solution, but
 maybe I'm missing something. Do I have to use regular expressions in PHP as
 the text is pulled from the database?
 
  Thanks in advance for your help.
 
  --veditio
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Names with apostrophe's

2004-09-29 Thread GH
You need to use the urlencode() function



On Wed, 29 Sep 2004 13:23:07 -0500, Craig Hoffman [EMAIL PROTECTED] wrote:
 Hello,
 I could use some help here.  I have an entry in the MySQL, that use an
 apostrophe,  for example lets call it O'Reilly.  I have added
 addslashes to my insert statement so MySQL accepts it with out
 complaining.
 
 The problem I am having is I use this information O'Reilly in a GET
 URL somewhere else in the site.
 For example here's my link:
 echo(tda
 href='user_book_results_detail.php?book=$row[book]$row[book]/a/
 td);
 
 When I mouse over and view the URL, PHP thinks the apostrophe (single
 quote) is the end and quits.   I know I need to include a back slash or
 escape this character  but I am not entirely sure how I do it?
 Suggestions?
 
 Sample URL:
 http://user_book_results_detail.php?book=O
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php