[PHP-DB] Variables de SESSION dentro de funciones PHP

2002-12-13 Thread Francisco José Saiz : : netPerceptions
Hola,
 
tengo una función en PHP que me lee de un fichero una configuración de
unas tablas de BBDD, quiero que el nombre de las tablas así como los
datos de conexión, me queden residentes en unas variables de sesión.
Cuando registro las variables dentro de la función, al acceder desde
cualquier otro punto con $HTTP_SESSION_VARS[nombrevariable] me pone
como que está vacía.
 
¿alguien podría aclararme el tratamiento de estas variables en PHP?
 
Saludos y muchas gracias.



RE: [PHP-DB] Variables de SESSION dentro de funciones PHP

2002-12-13 Thread Snijders, Mark
english please!!!



___ 

Mark Snijders, Developer 
Atos Origin 
Groenewoudeseweg 1, Room VN-515 
5621 BA  Eindhoven, The Netherlands 
*   : [EMAIL PROTECTED] 
*:+31 (0)40 - 2785992 (tel) 
* : +31 (0)40 - 2788729 (fax) 

The information in this mail is intended only for use of the individual or
entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
Access to this mail by anyone else than the addressee is unauthorized. If
you are not the intended recipient, any disclosure, copying, distribution or
any action taken omitted to be taken in reliance of it, is prohibited and
may be unlawful.



-Original Message-
From: _netPerceptions?= [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 13 december 2002 12:33
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Variables de SESSION dentro de funciones PHP


Hola,
 
tengo una función en PHP que me lee de un fichero una configuración de
unas tablas de BBDD, quiero que el nombre de las tablas así como los
datos de conexión, me queden residentes en unas variables de sesión.
Cuando registro las variables dentro de la función, al acceder desde
cualquier otro punto con $HTTP_SESSION_VARS[nombrevariable] me pone
como que está vacía.
 
¿alguien podría aclararme el tratamiento de estas variables en PHP?
 
Saludos y muchas gracias.


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




RE: [PHP-DB] Variables de SESSION dentro de funciones PHP

2002-12-13 Thread Ruprecht Helms
Hi  Francisco José Saiz netPerceptions,

would you be so kind and repeat your mail in english.

Regards,
Ruprecht

--
Ruprecht Helms IT-Service und Softwareentwicklung

Tel/Fax.:  +49[0]7621 16 99 16
Homepage:  http://www.rheyn.de
email:  [EMAIL PROTECTED]
--

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




RE: [PHP-DB] Variables de SESSION dentro de funciones PHP

2002-12-13 Thread Michael Hazelden
through the magic of babelfish!

I have a function in PHP that reads of a file a configuration to me of BBDD
tables, I want that the name of the tables as well as the data of
connection, I have left residents in session variables. When registry the
variables within the function, when acceding from any other point with
$$HTTP_SESSION_VARS[nombrevariable ] puts to me because she is empty.
somebody could clarify the treatment to me of these variables in PHP?
Greetings and thank you very much. 

(just in case he can't speak English!)
-Original Message-
From: Ruprecht Helms [mailto:[EMAIL PROTECTED]]
Sent: 13 December 2002 12:32
To: Francisco José Saiz :@mayn.de: netPerceptions
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Variables de SESSION dentro de funciones PHP


Hi  Francisco José Saiz netPerceptions,

would you be so kind and repeat your mail in english.

Regards,
Ruprecht

--
Ruprecht Helms IT-Service und Softwareentwicklung

Tel/Fax.:  +49[0]7621 16 99 16
Homepage:  http://www.rheyn.de
email:  [EMAIL PROTECTED]
--

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


_
This message has been checked for all known viruses by the 
MessageLabs Virus Control Centre.

This message has been checked for all known viruses by the MessageLabs Virus Control 
Centre.


*

Notice:  This email is confidential and may contain copyright material of Ocado 
Limited (the Company). Opinions and views expressed in this message may not 
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all 
copies of this message. Please note that it is your responsibility to scan this 
message for viruses.

Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY

*

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




RE: [PHP-DB] Variables de SESSION dentro de funciones PHP

2002-12-13 Thread Francisco José Saiz : : netPerceptions
Hi, 

I have made a PHP function that reads a tablename from a file. I want to
keep the tablename value into a session var. I register the session vars
and assign the value. But when I try to access outside the function the
variable is empty.

I do this:

session_start();

function OneFunction
{
$myvar=ABC;
session_register(myvar);
}

echo($HTTP_SESSION_VARS[myvar]);


And do not prints nothing.

Why? Is a scope fault?

Thanks.

-Original Message-
From: Snijders, Mark [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 1:08 PM
To: '_netPerceptions?='; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Variables de SESSION dentro de funciones PHP


english please!!!



___ 

Mark Snijders, Developer 
Atos Origin 
Groenewoudeseweg 1, Room VN-515 
5621 BA  Eindhoven, The Netherlands 
*   : [EMAIL PROTECTED] 
*:+31 (0)40 - 2785992 (tel) 
* : +31 (0)40 - 2788729 (fax) 

The information in this mail is intended only for use of the individual
or entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable
law. Access to this mail by anyone else than the addressee is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken omitted to be taken in
reliance of it, is prohibited and may be unlawful.



-Original Message-
From: _netPerceptions?= [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 13 december 2002 12:33
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Variables de SESSION dentro de funciones PHP


Hola,
 
tengo una función en PHP que me lee de un fichero una configuración de
unas tablas de BBDD, quiero que el nombre de las tablas así como los
datos de conexión, me queden residentes en unas variables de sesión.
Cuando registro las variables dentro de la función, al acceder desde
cualquier otro punto con $HTTP_SESSION_VARS[nombrevariable] me pone
como que está vacía.
 
¿alguien podría aclararme el tratamiento de estas variables en PHP?
 
Saludos y muchas gracias.



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




Re: [PHP-DB] mysql-windows xp

2002-12-13 Thread Jeffrey_N_Dyke

probably b/c of grants/rights
did you run a -- grant all on *.* to user@localhost ?  or something of the
sort. or set up root to have access

can you connect via command line?

HTH
Jeff


   
 
epeloke@echoma 
 
n.com (EdwardTo: [EMAIL PROTECTED]
 
Peloke)  cc:   
 
 Subject: [PHP-DB] mysql-windows xp
 
12/13/2002 
 
08:54 AM   
 
   
 
   
 




I got a new laptop yesterday that has xp home loaded.  I installed mysql
last night but get errors that I can't connect to 'localhost'.  Any ideas?

Thanks,
Eddie


--
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] mysql-windows xp

2002-12-13 Thread Edward Peloke
how do you do this?  I guess I could look it up in the help files.  I don't
need the firewall as it is behind one at home.

-Original Message-
From: SELPH,JASON (HP-Richardson,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:45 AM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp


turn off the xp firewall as well.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql-windows xp



probably b/c of grants/rights
did you run a -- grant all on *.* to user@localhost ?  or something of the
sort. or set up root to have access

can you connect via command line?

HTH
Jeff




epeloke@echoma

n.com (EdwardTo: [EMAIL PROTECTED]

Peloke)  cc:

 Subject: [PHP-DB] mysql-windows
xp
12/13/2002

08:54 AM









I got a new laptop yesterday that has xp home loaded.  I installed mysql
last night but get errors that I can't connect to 'localhost'.  Any ideas?

Thanks,
Eddie


--
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 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] mysql-windows xp

2002-12-13 Thread Jeffrey_N_Dyke

that didn't cause me any issues on my install.  why do you have to turn
that off.  i'm not doubting you, just curious?

Jeff


   
 
SELPH,JASON   
 
(HP-Richardson   To: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED],   
,ex1)[EMAIL PROTECTED]  
 
jason.selph@h   cc: [EMAIL PROTECTED]  
 
p.com   Subject: RE: [PHP-DB] mysql-windows xp
 
   
 
12/13/2002 
 
08:44 AM   
 
   
 
   
 




turn off the xp firewall as well.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql-windows xp



probably b/c of grants/rights
did you run a -- grant all on *.* to user@localhost ?  or something of the
sort. or set up root to have access

can you connect via command line?

HTH
Jeff




 epeloke@echoma

 n.com (EdwardTo: [EMAIL PROTECTED]

 Peloke)  cc:

   Subject: [PHP-DB] mysql-windows
xp
 12/13/2002

 08:54 AM









I got a new laptop yesterday that has xp home loaded.  I installed mysql
last night but get errors that I can't connect to 'localhost'.  Any ideas?

Thanks,
Eddie


--
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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread Edward Peloke
can't seem to find that line in the install file but I probably don't know
what I am looking for

IS this the install doc you meant?

http://www.mysql.com/documentation/mysql/bychapter/manual_Installing.html#In
stalling

Thanks,
Eddie

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:54 AM
To: SELPH,JASON (HP-Richardson,ex1)
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp



that didn't cause me any issues on my install.  why do you have to turn
that off.  i'm not doubting you, just curious?

Jeff



SELPH,JASON
(HP-Richardson   To:
'[EMAIL PROTECTED]' [EMAIL PROTECTED],
,ex1)[EMAIL PROTECTED]
jason.selph@h   cc: [EMAIL PROTECTED]
p.com   Subject: RE: [PHP-DB]
mysql-windows xp

12/13/2002
08:44 AM






turn off the xp firewall as well.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql-windows xp



probably b/c of grants/rights
did you run a -- grant all on *.* to user@localhost ?  or something of the
sort. or set up root to have access

can you connect via command line?

HTH
Jeff




 epeloke@echoma

 n.com (EdwardTo: [EMAIL PROTECTED]

 Peloke)  cc:

   Subject: [PHP-DB] mysql-windows
xp
 12/13/2002

 08:54 AM









I got a new laptop yesterday that has xp home loaded.  I installed mysql
last night but get errors that I can't connect to 'localhost'.  Any ideas?

Thanks,
Eddie


--
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 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] mysql-windows xp

2002-12-13 Thread SELPH,JASON (HP-Richardson,ex1)
by default on a new xp install the firewall is enabled.  stops everything on
your network from getting thru.  if port 3306 is blocked then accessing
mysql thru ip would be denied.
To disable internet connection firewall...

I have not installed mysql on xp, but the same thing happens with irc, http
servers, ftp servers, netbios, file sharing, etc.

In Control Panel, double-click Networking and Internet Connections, and then
click Network Connections.
Right-click the connection on which you would like to disable ICF, and then
click Properties.
On the Advanced tab, click the box to clear the option to Protect my
computer or network.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:54 AM
To: SELPH,JASON (HP-Richardson,ex1)
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp



that didn't cause me any issues on my install.  why do you have to turn
that off.  i'm not doubting you, just curious?

Jeff


 

SELPH,JASON

(HP-Richardson   To:
'[EMAIL PROTECTED]' [EMAIL PROTECTED],   
,ex1)[EMAIL PROTECTED]

jason.selph@h   cc: [EMAIL PROTECTED]

p.com   Subject: RE: [PHP-DB]
mysql-windows xp 
 

12/13/2002

08:44 AM

 

 





turn off the xp firewall as well.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql-windows xp



probably b/c of grants/rights
did you run a -- grant all on *.* to user@localhost ?  or something of the
sort. or set up root to have access

can you connect via command line?

HTH
Jeff




 epeloke@echoma

 n.com (EdwardTo: [EMAIL PROTECTED]

 Peloke)  cc:

   Subject: [PHP-DB] mysql-windows
xp
 12/13/2002

 08:54 AM









I got a new laptop yesterday that has xp home loaded.  I installed mysql
last night but get errors that I can't connect to 'localhost'.  Any ideas?

Thanks,
Eddie


--
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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread SELPH,JASON (HP-Richardson,ex1)
I honestly can't give you an answer on that as I haven't installed mysql on
XP.  On linux there are 2 ways to connect to your server, socket or tcp.  I
am not sure on the windows version.  I just know that trying to access
anything on a firewalled machine, even from itself, via tcp with XP didn't
work until I disable ICF.

Try running winmysqladmin though if you haven't already.  or give a more
detailed error message.

Jason  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:35 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp


Forgive me if this is a dumb question but is that still the case if mysql is
on the same machine?

Thanks,
Eddie

-Original Message-
From: SELPH,JASON (HP-Richardson,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 9:01 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: SELPH,JASON (HP-Richardson,ex1)
Subject: RE: [PHP-DB] mysql-windows xp


by default on a new xp install the firewall is enabled.  stops everything on
your network from getting thru.  if port 3306 is blocked then accessing
mysql thru ip would be denied.
To disable internet connection firewall...

I have not installed mysql on xp, but the same thing happens with irc, http
servers, ftp servers, netbios, file sharing, etc.

In Control Panel, double-click Networking and Internet Connections, and then
click Network Connections.
Right-click the connection on which you would like to disable ICF, and then
click Properties.
On the Advanced tab, click the box to clear the option to Protect my
computer or network.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:54 AM
To: SELPH,JASON (HP-Richardson,ex1)
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp



that didn't cause me any issues on my install.  why do you have to turn
that off.  i'm not doubting you, just curious?

Jeff




SELPH,JASON

(HP-Richardson   To:
'[EMAIL PROTECTED]' [EMAIL PROTECTED],
,ex1)[EMAIL PROTECTED]

jason.selph@h   cc: [EMAIL PROTECTED]

p.com   Subject: RE: [PHP-DB]
mysql-windows xp


12/13/2002

08:44 AM









turn off the xp firewall as well.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql-windows xp



probably b/c of grants/rights
did you run a -- grant all on *.* to user@localhost ?  or something of the
sort. or set up root to have access

can you connect via command line?

HTH
Jeff




 epeloke@echoma

 n.com (EdwardTo: [EMAIL PROTECTED]

 Peloke)  cc:

   Subject: [PHP-DB] mysql-windows
xp
 12/13/2002

 08:54 AM









I got a new laptop yesterday that has xp home loaded.  I installed mysql
last night but get errors that I can't connect to 'localhost'.  Any ideas?

Thanks,
Eddie


--
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 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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: Newbie - Is this possible with mysql? can i fake it in php?

2002-12-13 Thread Mark
The problem is that you're printing $size, but size is the result
code for the mysql_query() function. 
--
$size = mysql_query($query,$db) or die(query:  . mysql_error());
--

You need to fetch the values as you did in the first query.


--- Max Clark [EMAIL PROTECTED] wrote:
 Help-
 
 When I run the following code instead of getting the correct
 result,
 Resourse id #5 is displayed. If I run the printed query from the
 mysql
 console the output is correct.
 
 What am I doing wrong?
 
 Thanks in advance,
 Max
 
 $sql = select a.domain, a.transport from transport as a,
 acl as b
 where a.id=b.transportId and b.adminId='$userid';
 
 $result = mysql_query($sql,$db);
 
 while ($row = mysql_fetch_array($result)) {
 $domain = $row[domain];
 $query = select sum(a.recipient_size) from
 recipientstats
 as a where a.recipient_email like '%$domain';
 $size = mysql_query($query,$db) or die(query:  .
 mysql_error());
 print $query - $size;
 printf (td%s/tdtd%s/tdtda
 href=\stats.php?domain=%s\view stats/a/tdtd%s/td,
 $row[domain],
 $row[transport], $row[domain], $size);
 }
 
 mysql_free_result($result);
 
 
 Max Clark [EMAIL PROTECTED] wrote in message
 atb0h0$c49$[EMAIL PROTECTED]">news:atb0h0$c49$[EMAIL PROTECTED]...
  I've been reading various posts in the mysql mailing list that
 basically
 say
  that this functionality (unions, subselects) does not exit within
 mysql
 yet
  (I am just learning php/databases).
 
  Is there a way I can run this query in mysql? If not can I fake
 it out
 with
  php? What would the best way to do that be?
 
  Thanks in advance,
  Max
 
  Max Clark [EMAIL PROTECTED] wrote in message news:...
   So I am trying to accomplish something like this:
  
   select a.domain, a.transport, sum(c.recipient_count)
 sum(c.recipient_size)
   from transport as a, acl as b, recipientstats as c where
  a.id=b.transportId
   and b.adminId='1' and c.recipient_email like '%a.domain';
  
   But I know I am missing something because of the error.
  
   Can anyone point me in the right direction?
  
   Thanks in advance,
   Max
  
   Max Clark [EMAIL PROTECTED] wrote in message
   news:ataq2r$ev1$[EMAIL PROTECTED]...
Hi-
   
I am trying to write a sql query that will output (domain,
 transport,
sum(count), sum(size)) from multiple tables for many records.
   
When the domain field is dynamic based on the adminId passed
 to the
  query,
how do I execute the second query at the same time?
   
Thanks in advance,
Max
   
select a.domain, a.transport from transport as a, acl as b
 where
a.id=b.transportId and b.adminId='1';
select sum(count), sum(size) from stats where email like
 '%a.domain';
   
   
   
   
   
   
   

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
   
To request this thread, e-mail
 [EMAIL PROTECTED]
To unsubscribe, e-mail
   [EMAIL PROTECTED]
Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php
   
   
  
  
 
 
 
 
 
  --
  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
 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to death to 
defend everyone else's right to the same thing.
-Stolen from the now-defunct Randy's Random mailing list.
***

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP-DB] HELP!! Warning: mysql_pconnect:

2002-12-13 Thread John Krewson
Try mysql_connect instead.  Doesn't sound as if you are at the stage at 
which you would realize any gains from a persistent connection.  I've 
just seen a  lot of comments regarding strange happenings with pconnect 
- which I have no doubt will be addressed later.


Don Briggs wrote:

While viewing web pages, we sometimes get the following error: Warning:
mysql_pconnect: Link to server lost, unable to reconnect in
/home/dratner/includes/common.inc on line 26 . The offending line is this
code:
if (!$db = mysql_pconnect(db1, diadba,
c0s3mST));

This line is in our common include file. It is supposed to create a
connection to the database and return an error if the connection fails. It
usually works, but sometimes we get the above error. Refreshing the page
makes the error go away, but that is not a very good solution, and we need
to figure it out before we lauch our site.

Configuration:

We are running 4.3.0RC2 and MySQL 3.23.53A on Linux 8.0. Our PHP server is
connected directly to the MySQL server via a cross-connect cable. So these
two machines have a private 100Mb connection used exclusivly for database
communication. We are currently developing an auction.

Since we are currently in development there are only two or three people
accessing the site. We are worried that the problem will get worse when the
we launch our application and we have a real work load on the server.
I would greatly appreciate any help that anyone could offer. I just can't
figure out why we sometimes have trouble connecting, especially with the
load on two large servers being so tiny.

   Don! Briggs

   [EMAIL PROTECTED]



 



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




[PHP-DB] Dumping MySQL rows into a 2D array

2002-12-13 Thread George Pitcher
Hi all,

I want to grab the resul from a db query and store it in an array so that I
can selectively grab the data later.

This is what I'm doing:

$dbRowCount = mysql_num_rows( $result );
for ($i = 1; $i = $dbRowCount; ++$i) {
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$dbRow['ev_id']= $row[id];
$dbRow['ev_uid']   = $row[user_id];
$dbRow['ev_title'] = $row[name];
$dbRow['ev_cat']   = $row[category];
$dbRow['ev_sd']= $row[start_day];
$dbRow['ev_ed']= $row[end_day];
}
}

In my sample database, I have two records which are both found with the
query (tested in MySQLFront) but the array ends up with 3 rows each with the
last record in it.

Any suggestions?

George

===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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




[PHP-DB] Re: Dumping MySQL rows into a 2D array

2002-12-13 Thread Bastian Vogt
Hi,

first leave out the loop with for ($i...).
then use the loop with while and make sure that you create arrays. you're
currently filling the same variables with different results each time. the last
one always overwrites the ones bevor.
so add those brackets: []:
 $dbRow['ev_id'][]= $row[id];
 $dbRow['ev_uid'][]   = $row[user_id];
  


HTH,
Bastian

George Pitcher schrieb:

 Hi all,

 I want to grab the resul from a db query and store it in an array so that I
 can selectively grab the data later.

 This is what I'm doing:

 $dbRowCount = mysql_num_rows( $result );
 for ($i = 1; $i = $dbRowCount; ++$i) {
 while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
 $dbRow['ev_id']= $row[id];
 $dbRow['ev_uid']   = $row[user_id];
 $dbRow['ev_title'] = $row[name];
 $dbRow['ev_cat']   = $row[category];
 $dbRow['ev_sd']= $row[start_day];
 $dbRow['ev_ed']= $row[end_day];
 }
 }

 In my sample database, I have two records which are both found with the
 query (tested in MySQLFront) but the array ends up with 3 rows each with the
 last record in it.

 Any suggestions?

 George

 ===

 George Pitcher
 HERON Technical Manager
 Ingenta plc
 23-38 Hythe Bridge Street, Oxford, OX1 2ET
 T  +44 (0)1865 799137 direct
 T  +44 (0)1865 799000 switchboard
 F  +44 (0)1865 799134
 E  [EMAIL PROTECTED]

 www.ingenta.com
 Ingenta: Empowering the exchange of academic and professional content
 online.


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




RE: [PHP-DB] Re: Dumping MySQL rows into a 2D array

2002-12-13 Thread George Pitcher
Bastian,

That's great - it does the trick perfectly. Many thanks.

George


 -Original Message-
 From: Bastian Vogt [mailto:[EMAIL PROTECTED]]
 Sent: 13 December 2002 3:18 pm
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Re: Dumping MySQL rows into a 2D array
 
 
 Hi,
 
 first leave out the loop with for ($i...).
 then use the loop with while and make sure that you create 
 arrays. you're
 currently filling the same variables with different results each 
 time. the last
 one always overwrites the ones bevor.
 so add those brackets: []:
  $dbRow['ev_id'][]= $row[id];
  $dbRow['ev_uid'][]   = $row[user_id];
   
 
 
 HTH,
 Bastian
 
 George Pitcher schrieb:
 
  Hi all,
 
  I want to grab the resul from a db query and store it in an 
 array so that I
  can selectively grab the data later.
 
  This is what I'm doing:
 
  $dbRowCount = mysql_num_rows( $result );
  for ($i = 1; $i = $dbRowCount; ++$i) {
  while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
  $dbRow['ev_id']= $row[id];
  $dbRow['ev_uid']   = $row[user_id];
  $dbRow['ev_title'] = $row[name];
  $dbRow['ev_cat']   = $row[category];
  $dbRow['ev_sd']= $row[start_day];
  $dbRow['ev_ed']= $row[end_day];
  }
  }
 
  In my sample database, I have two records which are both found with the
  query (tested in MySQLFront) but the array ends up with 3 rows 
 each with the
  last record in it.
 
  Any suggestions?
 
  George
 
  ===
 
  George Pitcher
  HERON Technical Manager
  Ingenta plc
  23-38 Hythe Bridge Street, Oxford, OX1 2ET
  T  +44 (0)1865 799137 direct
  T  +44 (0)1865 799000 switchboard
  F  +44 (0)1865 799134
  E  [EMAIL PROTECTED]
 
  www.ingenta.com
  Ingenta: Empowering the exchange of academic and professional content
  online.
 
 
 -- 
 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] mysql-windows xp

2002-12-13 Thread Edward Peloke
Thanks for all the help.  I finally got it running by running winmysqladmin

Eddie

-Original Message-
From: SELPH,JASON (HP-Richardson,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 9:29 AM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp


I honestly can't give you an answer on that as I haven't installed mysql on
XP.  On linux there are 2 ways to connect to your server, socket or tcp.  I
am not sure on the windows version.  I just know that trying to access
anything on a firewalled machine, even from itself, via tcp with XP didn't
work until I disable ICF.

Try running winmysqladmin though if you haven't already.  or give a more
detailed error message.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 8:35 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp


Forgive me if this is a dumb question but is that still the case if mysql is
on the same machine?

Thanks,
Eddie

-Original Message-
From: SELPH,JASON (HP-Richardson,ex1) [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 9:01 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: SELPH,JASON (HP-Richardson,ex1)
Subject: RE: [PHP-DB] mysql-windows xp


by default on a new xp install the firewall is enabled.  stops everything on
your network from getting thru.  if port 3306 is blocked then accessing
mysql thru ip would be denied.
To disable internet connection firewall...

I have not installed mysql on xp, but the same thing happens with irc, http
servers, ftp servers, netbios, file sharing, etc.

In Control Panel, double-click Networking and Internet Connections, and then
click Network Connections.
Right-click the connection on which you would like to disable ICF, and then
click Properties.
On the Advanced tab, click the box to clear the option to Protect my
computer or network.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:54 AM
To: SELPH,JASON (HP-Richardson,ex1)
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql-windows xp



that didn't cause me any issues on my install.  why do you have to turn
that off.  i'm not doubting you, just curious?

Jeff




SELPH,JASON

(HP-Richardson   To:
'[EMAIL PROTECTED]' [EMAIL PROTECTED],
,ex1)[EMAIL PROTECTED]

jason.selph@h   cc: [EMAIL PROTECTED]

p.com   Subject: RE: [PHP-DB]
mysql-windows xp


12/13/2002

08:44 AM









turn off the xp firewall as well.

Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 7:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql-windows xp



probably b/c of grants/rights
did you run a -- grant all on *.* to user@localhost ?  or something of the
sort. or set up root to have access

can you connect via command line?

HTH
Jeff




 epeloke@echoma

 n.com (EdwardTo: [EMAIL PROTECTED]

 Peloke)  cc:

   Subject: [PHP-DB] mysql-windows
xp
 12/13/2002

 08:54 AM









I got a new laptop yesterday that has xp home loaded.  I installed mysql
last night but get errors that I can't connect to 'localhost'.  Any ideas?

Thanks,
Eddie


--
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 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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Linux+php+remote MS SQL

2002-12-13 Thread John Krewson
We are currently running two report generation applications where PHP is 
running on Linux machines and queries data from Windows NT servers 
running MSSQL 7.0

We have reports that deal with millions of records, and whether they run 
for 4 minutes or 20, I have only seen robust results from the PHP/MSSQL 
combination. (I know, 20 minutes is a long time...I didn't say that all 
of my SQL statements were robust (-:  )

Regarding remote access to SQL server 7, as far as I know the only way 
to access SQL Server remotely is from another machine also running SQL 
server.  From SQL Server Enterprise Manager you can add databases to 
access, setting the login properties to either use Windows 
authentication or SQL server authentication.   SQL Server has great 
documentation, their Books Online, and is, I believe, a pretty easy app 
to figure out.  Remotely you can add databases, change users, run 
queries, etc...again the only downside is that you need to be on windows 
running SQL Server on the client.  I've looked for a remote SQL Server 
tool that could run on OSX or Linux, but have not yet found one that 
meets all my needs...anyone?

You asked if your setup will slow down the application.  I have to ask, 
is the DB server going to be behind a firewall?  I'm no networking guru, 
but we had some speed issues initially when our DB server was behine the 
firewall and the apache server was not.  It seemed to me that there was 
time spent moving data back and forth, as now that we have both machines 
behind the firewall things have speeded up considerably. The real lesson 
I learned, however, was to make every connection count, as in get as 
much data as possible per query and lean on the Linux box to process, 
sort, count, etc if I could rather than getting a small chunk of data, 
going back to the DB, etc etc.  Considering how easy it is to remotely 
administer a Linux machine, it's too bad you can't have it with the DB 
machine.

I'm not quite sure what you mean by your last question regarding PHP's 
mssql functions vs. ODBC.   I do not and have never used ODBC to connect 
PHP to SQL Server,  although in our situation I think it would add a 
layer of complexity and possibly slow things down a bit, but that's just 
a guess.  I'm assuming you were asking if using connecting via ODBC is 
slower.

See:
http://www.php.net/manual/en/function.mssql-connect.php
http://www.phpbuilder.net/columns/alberto2919.php3

for more specific info regarding setup and mssql libraries.

Hope this was helpful.  Once you get started you should be able to find 
plenty of info in the php-db mailing list archive regarding how to make 
this setup work.



Ruth Zhai wrote:

Hi Everyone,
I have spent a few hours searching on the internet, but still can not get the information I need.  So I turn to you for help.

I will be doing a web site which has a lot of data from a remote mssql server.  The scripts will be in php and run on Linux.  As requirements, the mssql will stay at the client's internal network, and linux server will be right here with me.  For your information, we are considering using broad band connection for the web server although this has not been finalized.  The web site will initially have 3000 clients, and the db will be updated on daily basis.  For me, this is challenge because this is the first time for me to use remote db server, first time to use mssql server and first time to use combination of open source and MS products.  Forgive me if I don't ask proper questions.  The followings are my questions:

1. Will this combination cause a lot of problems?  Will it be stable enough?
2. Because the db server is not connected to the internet, I am not sure what options I have in terms of connection to the db.  Would some one point me a direction or tutorial about this?
3. Will remote access slow down the application a lot?
3. PHP has functions for mssql.  Does any one know how those compare with ODBC?

I would appreciate if you could share your experience with me or give me your opinion on the above issues.

Thank you very much in advance.

Ruth

 



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




[PHP-DB] setup issues again

2002-12-13 Thread Edward Peloke
I know this isn't db related but...I finally go mysql and apache running on
my laptop now I am trying to get php working.  I downloaded the
php-4.2.3-installer this morning.  Ran the install and am now going through
the install instructions.  I noticed it said to copy  these lines into the
apache conf file.  But I noticed that I do not have a sapi folder under my
php folderdid I miss something?

Thanks,
Eddie


   LoadModule php4_module c:/php/sapi/php4apache.dll
   AddModule mod_php4.c
   AddType application/x-httpd-php .php


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




RE: [PHP-DB] Variables de SESSION dentro de funciones PHP

2002-12-13 Thread Francisco José Saiz : : netPerceptions
Thanks, I'll try it now.

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 13, 2002 1:49 PM
To: Francisco José Saiz :: netPerceptions
Subject: Re: [PHP-DB] Variables de SESSION dentro de funciones PHP


You're mixing register_globals off session code with register_globals on

session code.  $HTTP_SESSION_VARS['myvar'] doesn't get defined until the

second page view after setting it.  Try:

session_start();

function OneFunction()
{
$GLOBALS['HTTP_SESSION_VARS']['myvar'] = 'ABC';
}
onefunction();
echo($HTTP_SESSION_VARS[myvar]);



Francisco José Saiz :: netPerceptions wrote:

Hi,

I have made a PHP function that reads a tablename from a file. I want 
to keep the tablename value into a session var. I register the session 
vars and assign the value. But when I try to access outside the 
function the variable is empty.

I do this:

session_start();

function OneFunction
{
   $myvar=ABC;
   session_register(myvar);
}

echo($HTTP_SESSION_VARS[myvar]);


And do not prints nothing.

Why? Is a scope fault?

Thanks.

-Original Message-
From: Snijders, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 1:08 PM
To: '_netPerceptions?='; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Variables de SESSION dentro de funciones PHP


english please!!!



___

Mark Snijders, Developer
Atos Origin 
Groenewoudeseweg 1, Room VN-515 
5621 BA  Eindhoven, The Netherlands 
*   : [EMAIL PROTECTED] 
*:+31 (0)40 - 2785992 (tel) 
* : +31 (0)40 - 2788729 (fax) 

The information in this mail is intended only for use of the individual

or entity to which it is addressed and may contain information that is 
privileged, confidential and exempt from disclosure under applicable 
law. Access to this mail by anyone else than the addressee is 
unauthorized. If you are not the intended recipient, any disclosure, 
copying, distribution or any action taken omitted to be taken in 
reliance of it, is prohibited and may be unlawful.



-Original Message-
From: _netPerceptions?= [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 13 december 2002 12:33
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Variables de SESSION dentro de funciones PHP


Hola,
 
tengo una función en PHP que me lee de un fichero una configuración de 
unas tablas de BBDD, quiero que el nombre de las tablas así como los 
datos de conexión, me queden residentes en unas variables de sesión. 
Cuando registro las variables dentro de la función, al acceder desde 
cualquier otro punto con $HTTP_SESSION_VARS[nombrevariable] me pone 
como que está vacía.
 
¿alguien podría aclararme el tratamiento de estas variables en PHP?
 
Saludos y muchas gracias.



  


-- 
The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent
of the law.





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




Re: [PHP-DB] Cool MySQL - Excel Shell Script

2002-12-13 Thread Mark
I was playing around with this, and created a DOS batch file that
should be equivalent. Note it was about 15 minutes of work including
debugging, so I can't guarantee success. It's nothing compliated, but
if oyu need to get mysql data into excel often, this might help.

--query.bat--
rem  Show the query
echo Query: %1
rem Run the query (enter as one line, not two!)
mysql --host=localhost --user=user --password=password
--database=%2 --execute=%1  \sql_excel.tmp
rem Open the result in Excel (enter as one line)
start C:\Program Files\Microsoft Office\Office\EXCEL.EXE
\sql_excel.tmp
--end query.bat--

Syntax for using it is:

query select string database

You need to use quotes so that DOS understands it's all one command.


--- Michael Zornek [EMAIL PROTECTED] wrote:
 Here is a simple, yet very useful shell script that will automate
 MySQL
 output to open into Excel where you can view it with more control,
 save it
 to a spreadsheet for other coworkers, etc.
 
 I played with this a bit and it's really cool. Bound to save me a
 lot of
 time so I thought I'd share. While this is written mainly for OS X
 I'd
 imagine it could be adapted for Windows if that¹s your OS of
 choice.
 
 http://www.macosxhints.com/article.php?story=20021125061350898
 
 ~ Mike
 -- 
 MikeZornek.com
 New blog, new QA column, new content everywhere!
 http://www.mikezornek.com
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to death to 
defend everyone else's right to the same thing.
-Stolen from the now-defunct Randy's Random mailing list.
***

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




[PHP-DB] bulk miorting rows into mysql db

2002-12-13 Thread mikek
I have a few hundred rows of data to import into a mysql db. Its currently
tab separated. 

What's the most straight forward way (ie i dont want to enter it line by
line) of doing a bulk import?

I have full admin rights to my dev server. Is there a method or software app
that people can recommend to me.

Much appreciated.
 
---
Mike Karthauser - email:[EMAIL PROTECTED] - phone:0117 9426653
brightstorm - curiously online - http://www.brightstorm.co.uk


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




Re: [PHP-DB] bulk miorting rows into mysql db

2002-12-13 Thread Adam Williams
use mysqlimport, its a program that comes with MySQL.  go to www.mysql.com
and click on documentation to learn more about it.

Adam

On Fri, 13 Dec 2002, mikek wrote:

 I have a few hundred rows of data to import into a mysql db. Its currently
 tab separated.

 What's the most straight forward way (ie i dont want to enter it line by
 line) of doing a bulk import?

 I have full admin rights to my dev server. Is there a method or software app
 that people can recommend to me.

 Much appreciated.

 ---
 Mike Karthauser - email:[EMAIL PROTECTED] - phone:0117 9426653
 brightstorm - curiously online - http://www.brightstorm.co.uk





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




[PHP-DB] Selecting more than asked for

2002-12-13 Thread Alex Francis
I am using PHP and MySQL and in one section I am trying to SELECT for a
table where unit_id = $variable. In that column I have several blank items.
When I select a particular variable I get that plus all the blanks. I
presume there is some way of getting just those which meet my criteria.



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




Re: [PHP-DB] bulk miorting rows into mysql db

2002-12-13 Thread 1LT John W. Holmes
 I have a few hundred rows of data to import into a mysql db. Its currently
 tab separated.

 What's the most straight forward way (ie i dont want to enter it line by
 line) of doing a bulk import?

 I have full admin rights to my dev server. Is there a method or software
app
 that people can recommend to me.

If the columns match your database exactly, then you can use LOAD DATA
INFILE command.

If not, then you can write a PHP script to read each line and format it into
an INSERT query.

---John Holmes...


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




RE: [PHP-DB] Selecting more than asked for

2002-12-13 Thread Hutchins, Richard
Try:

SELECT some_column FROM some_table WHERE column_value IS NOT NULL AND
unit_ID=$variable

If that's kind of what you're looking for, there's good info in the MySQL
manual about the WHERE condition and other sorting and selecting options.

HTH
 -Original Message-
 From: Alex Francis [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 13, 2002 2:35 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Selecting more than asked for
 
 
 I am using PHP and MySQL and in one section I am trying to 
 SELECT for a
 table where unit_id = $variable. In that column I have 
 several blank items.
 When I select a particular variable I get that plus all the blanks. I
 presume there is some way of getting just those which meet my 
 criteria.
 
 
 
 -- 
 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] Re: select only where 2 things are true

2002-12-13 Thread rolf vreijdenberger

SELECT jouw_id
FROM A AS A1, A AS A2
WHERE A1.merkid=1
AND A2.merk_id=2
AND A1.jouw_id=A2.jouw_id

this is a self join!
thanks to vincent @ www.yapf.net



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




Re: [PHP-DB] mysql-windows xp

2002-12-13 Thread Tyler Whitesides
Hi,
If you want MySQL to work in XP, make sure that you have the proper version
(XP/2000/NT) and in the advanced settings of your firewall, make sure to
allow TCP port 3306 to have full internet access from inside as well as out.
Good luck,
Tyler
- Original Message -
From: SELPH,JASON (HP-Richardson,ex1) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, December 13, 2002 6:28 AM
Subject: RE: [PHP-DB] mysql-windows xp


 I honestly can't give you an answer on that as I haven't installed mysql
on
 XP.  On linux there are 2 ways to connect to your server, socket or tcp.
I
 am not sure on the windows version.  I just know that trying to access
 anything on a firewalled machine, even from itself, via tcp with XP didn't
 work until I disable ICF.

 Try running winmysqladmin though if you haven't already.  or give a more
 detailed error message.

 Jason

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 13, 2002 8:35 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] mysql-windows xp


 Forgive me if this is a dumb question but is that still the case if mysql
is
 on the same machine?

 Thanks,
 Eddie

 -Original Message-
 From: SELPH,JASON (HP-Richardson,ex1) [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 13, 2002 9:01 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Cc: SELPH,JASON (HP-Richardson,ex1)
 Subject: RE: [PHP-DB] mysql-windows xp


 by default on a new xp install the firewall is enabled.  stops everything
on
 your network from getting thru.  if port 3306 is blocked then accessing
 mysql thru ip would be denied.
 To disable internet connection firewall...

 I have not installed mysql on xp, but the same thing happens with irc,
http
 servers, ftp servers, netbios, file sharing, etc.

 In Control Panel, double-click Networking and Internet Connections, and
then
 click Network Connections.
 Right-click the connection on which you would like to disable ICF, and
then
 click Properties.
 On the Advanced tab, click the box to clear the option to Protect my
 computer or network.

 Jason

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 13, 2002 7:54 AM
 To: SELPH,JASON (HP-Richardson,ex1)
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] mysql-windows xp



 that didn't cause me any issues on my install.  why do you have to turn
 that off.  i'm not doubting you, just curious?

 Jeff




 SELPH,JASON

 (HP-Richardson   To:
 '[EMAIL PROTECTED]' [EMAIL PROTECTED],
 ,ex1)[EMAIL PROTECTED]

 jason.selph@h   cc: [EMAIL PROTECTED]

 p.com   Subject: RE: [PHP-DB]
 mysql-windows xp


 12/13/2002

 08:44 AM









 turn off the xp firewall as well.

 Jason

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 13, 2002 7:29 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] mysql-windows xp



 probably b/c of grants/rights
 did you run a -- grant all on *.* to user@localhost ?  or something of the
 sort. or set up root to have access

 can you connect via command line?

 HTH
 Jeff




  epeloke@echoma

  n.com (EdwardTo: [EMAIL PROTECTED]

  Peloke)  cc:

Subject: [PHP-DB] mysql-windows
 xp
  12/13/2002

  08:54 AM









 I got a new laptop yesterday that has xp home loaded.  I installed mysql
 last night but get errors that I can't connect to 'localhost'.  Any ideas?

 Thanks,
 Eddie


 --
 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 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 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