php-general Digest 16 Jun 2010 08:57:34 -0000 Issue 6801
Topics (messages 306171 through 306189):
Re: protecting email addresses on a web site
306171 by: HallMarc Websites
306174 by: Ashley Sheridan
How could I mix popen() and pcntl_alarm() function ?
306172 by: Chian Hsieh
306181 by: Jim Lucas
306188 by: Chian Hsieh
Re: [PHP-WEBMASTER] Web Service Problem
306173 by: Richard Quadling
306180 by: Michael Shadle
Re: Multiple Login in a single PC should not be possible
306175 by: Karl DeSaulniers
306176 by: Ashley Sheridan
306177 by: Karl DeSaulniers
306178 by: Karl DeSaulniers
306179 by: Ashley Sheridan
306182 by: Karl DeSaulniers
SQL Syntax
306183 by: Jan Reiter
306184 by: Daniel Brown
306185 by: Ashley Sheridan
306186 by: Jan Reiter
306187 by: Ashley Sheridan
306189 by: Simcha Younger
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
-----Original Message-----
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Monday, June 14, 2010 10:52 AM
To: Dotan Cohen
Cc: HallMarc Websites; David Mehler; php-general
Subject: Re: [PHP] protecting email addresses on a web site
On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote:
> On 14 June 2010 15:36, HallMarc Websites <sa...@hallmarcwebsites.com>
wrote:
> > Another is a CSS solution where you type the email address backwards and
> > then use the CSS style declaration:
> > style="direction: rtl; unicode-bidi: bidi-override;"
> >
>
> How does that work with screen readers? How about copy-paste?
>
I don't think there's an accessible way of doing this. Anything that
allows a screen reader to speak the email address would also be
susceptible to spammers email scrapers.
Thanks,
Ash
http://www.ashleysheridan.co.uk
Copy-n-paste just gives you the email address backwards; screen readers,
because we are using logical ordering and it is stored in memory the way we
expect to read it, will read it correctly.
I was not aware that email harvesters used screen readers. Do you have some
documentation I could read to get up to speed on this?
Marc Hall
HallMarc Websites
So many spammers, so few bullets...
__________ Information from ESET Smart Security, version of virus signature
database 5199 (20100615) __________
The message was checked by ESET Smart Security.
http://www.eset.com
--- End Message ---
--- Begin Message ---
On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote:
>
> -----Original Message-----
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Monday, June 14, 2010 10:52 AM
> To: Dotan Cohen
> Cc: HallMarc Websites; David Mehler; php-general
> Subject: Re: [PHP] protecting email addresses on a web site
>
> On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote:
>
> > On 14 June 2010 15:36, HallMarc Websites <sa...@hallmarcwebsites.com>
> wrote:
> > > Another is a CSS solution where you type the email address backwards and
> > > then use the CSS style declaration:
> > > style="direction: rtl; unicode-bidi: bidi-override;"
> > >
> >
> > How does that work with screen readers? How about copy-paste?
> >
>
>
> I don't think there's an accessible way of doing this. Anything that
> allows a screen reader to speak the email address would also be
> susceptible to spammers email scrapers.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
> Copy-n-paste just gives you the email address backwards; screen readers,
> because we are using logical ordering and it is stored in memory the way we
> expect to read it, will read it correctly.
>
> I was not aware that email harvesters used screen readers. Do you have some
> documentation I could read to get up to speed on this?
>
> Marc Hall
> HallMarc Websites
> So many spammers, so few bullets...
>
>
> __________ Information from ESET Smart Security, version of virus signature
> database 5199 (20100615) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
I didn't say the harvesters used screen readers. I'm saying that if
something is in plain text that a screen reader can understand, what's
to stop an email address harvester? It's not worth their time to analyse
every image (think about where Google is with image searching right now,
and they have a lot more resources at their disposal) but it is easy
enough to read text in a web page. At a push, it's possible to believe
that some might be using rendered CSS to see how an email is rendered.
Thing is, it's nigh on impossible to hide an email address. Use it once
on a mailing list like this and it's there for the whole world to see on
archive listings. I even though that my email wouldn't be found in
a .pdf CV I'd made, but thanks to Google it is now!
Basically, it might not be worth the effort to hide email addresses, and
instead see about setting up spam filtering at the server level. You
don't have to download and filter it your end, and it saves on
bandwidth.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Hi,
I want to use tail command to tail the file by popen and trigger the
function signal() by every 3 secs.
Here is my example code:
declare(ticks = 1);
// Unreachable function
function signal($signal) {
echo "SIGALRM\n";
pcntl_alarm(3);
}
pcntl_signal(SIGALRM, "signal");
pcntl_alarm(3);
$fpcmd = popen("tail -f my.log", 'r');
while (!feof($fpcmd)) {
$line = fgets($fpcmd);
echo $line;
}
Unfortunately, the signal() function is never reached.
Why ? Could someone help me ?
Thanks for your help.
- Arron
--- End Message ---
--- Begin Message ---
Chian Hsieh wrote:
> Hi,
>
> I want to use tail command to tail the file by popen and trigger the
> function signal() by every 3 secs.
>
> Here is my example code:
>
> declare(ticks = 1);
> // Unreachable function
> function signal($signal) {
> echo "SIGALRM\n";
> pcntl_alarm(3);
> }
>
> pcntl_signal(SIGALRM, "signal");
> pcntl_alarm(3);
> $fpcmd = popen("tail -f my.log", 'r');
> while (!feof($fpcmd)) {
> $line = fgets($fpcmd);
> echo $line;
> }
>
>
> Unfortunately, the signal() function is never reached.
> Why ? Could someone help me ?
>
> Thanks for your help.
>
> - Arron
>
What version of PHP are you running?
Read: http://php.net/declare
I found this at the bottom of the declare page.
[quote]
The encoding declare value is ignored in PHP 5.3 unless php is compiled with
--enable-zend-multibyte.
[/quote]
Also, doesn't look like you are using the "register_tick_function()" function.
Is it required? Not sure, but their examples show its usage.
--
Jim Lucas
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
--- End Message ---
--- Begin Message ---
Hi,
my PHP version is PHP 5.2.4-2.
I was according to the example in page ( pcntl_alarm() function doc page )
http://www.php.net/manual/en/function.pcntl-alarm.php
<http://www.php.net/manual/en/function.pcntl-alarm.php>In that page,
the register_tick_function()
does not register any function, and it's work on that example in above URI.
In my try and error experiment, I think the SIGALRM does not trigger because
we called popen() function.
Could anyone help ?
Thanks
- Arron
On Wed, Jun 16, 2010 at 2:38 AM, Jim Lucas <li...@cmsws.com> wrote:
> Chian Hsieh wrote:
> > Hi,
> >
> > I want to use tail command to tail the file by popen and trigger the
> > function signal() by every 3 secs.
> >
> > Here is my example code:
> >
> > declare(ticks = 1);
> > // Unreachable function
> > function signal($signal) {
> > echo "SIGALRM\n";
> > pcntl_alarm(3);
> > }
> >
> > pcntl_signal(SIGALRM, "signal");
> > pcntl_alarm(3);
> > $fpcmd = popen("tail -f my.log", 'r');
> > while (!feof($fpcmd)) {
> > $line = fgets($fpcmd);
> > echo $line;
> > }
> >
> >
> > Unfortunately, the signal() function is never reached.
> > Why ? Could someone help me ?
> >
> > Thanks for your help.
> >
> > - Arron
> >
>
> What version of PHP are you running?
>
> Read: http://php.net/declare
>
> I found this at the bottom of the declare page.
>
> [quote]
> The encoding declare value is ignored in PHP 5.3 unless php is compiled
> with
> --enable-zend-multibyte.
> [/quote]
>
> Also, doesn't look like you are using the "register_tick_function()"
> function.
>
> Is it required? Not sure, but their examples show its usage.
>
> --
> Jim Lucas
>
> A: Maybe because some people are too annoyed by top-posting.
> Q: Why do I not get an answer to my question(s)?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
--
- Chi-An Hsieh
--
- Chi-An Hsieh
--- End Message ---
--- Begin Message ---
On 15 June 2010 17:07, Michael Shadle <mike...@gmail.com> wrote:
> Wso2 is also pretty awesome.
>
> I wish soap would just die and be replaced with rest and json.
>
> On Jun 15, 2010, at 6:15 AM, Richard Quadling <rquadl...@gmail.com> wrote:
>
>> On 15 June 2010 12:44, John <john.zaka...@graphicano.com> wrote:
>>>
>>>
>>>
>>> Really i need help coz i am trying to solve this problem from 4 weeks and i
>>> can not so please help me
>>>
>>> I want to use a web service ( created in ASP.NEt ) in my web site using php
>>> coz i will use the result in other php pages.
>>> the web service link is:
>>> http://196.218.16.133/onlinereservation/service.asmx?WSDL
>>>
>>> function name: HotelData under HotelsSearch
>>>
>>> Is there a tool for PHP or any other way to pass string for HotelData
>>> and get an XML file containing the result?
>>>
>>>
>>>
>>> I tried to learn SOAP in the manual and I can not till now return data
>>> from this web service
>>>
>>>
>>>
>>> My Code is:
>>>
>>>
>>>
>>> <?
>>>
>>> header("Content-Type: text/plain");
>>>
>>> $client = new
>>> SOAPClient('http://196.218.16.133/OnlineReservationTravelline/service.asmx?WSDL');
>>>
>>>
>>>
>>> try {
>>>
>>> $params->HotelData =
>>> '<HotelsParameters><CityID>388</CityID><UserName>admin</UserName><UserPassword>admin</UserPassword><DateFrom>6/12/2010</DateFrom><DateTo>6/13/2010</DateTo><NumberOfRooms>2</NumberOfRooms><Room><RoomSerial>1</RoomSerial><Adults>1</Adults><Child><ChildSerial>1</ChildSerial><ChildAge>5</ChildAge></Child></Room><Room><RoomSerial>2</RoomSerial><Adults>2</Adults><Child><ChildSerial>1</ChildSerial><ChildAge>8</ChildAge></Child><Child><ChildSerial>2</ChildSerial><ChildAge>5</ChildAge></Child></Room><CurrencyID>162</CurrencyID></HotelsParameters>';
>>>
>>>
>>>
>>> $result = $client->HotelsSearch($params);
>>>
>>> //echo $result;
>>>
>>> } catch (SOAPFault $exception) {
>>>
>>>
>>>
>>> print $exception;
>>>
>>> print htmlspecialchars($client->__getLastRequest());
>>>
>>> }
>>>
>>>
>>>
>>> var_dump($result);
>>>
>>>
>>>
>>> ?>
>>>
>>>
>>>
>>> Note: the string is '
>>> <HotelsParameters><CityID>388</CityID><UserName>admin</UserName><UserPassword>admin</UserPassword><DateFrom>6/12/2010</DateFrom><DateTo>6/13/2010</DateTo><NumberOfRooms>2</NumberOfRooms><Room><RoomSerial>1</RoomSerial><Adults>1</Adults><Child><ChildSerial>1</ChildSerial><ChildAge>5</ChildAge></Child></Room><Room><RoomSerial>2</RoomSerial><Adults>2</Adults><Child><ChildSerial>1</ChildSerial><ChildAge>8</ChildAge></Child><Child><ChildSerial>2</ChildSerial><ChildAge>5</ChildAge></Child></Room><CurrencyID>162</CurrencyID></HotelsParameters>’
>>>
>>>
>>>
>>>
>>>
>>> John Zakaria Sabry
>>> Senior Web Developer
>>>
>>>
>>>
>>> 3 El Nasr Street, EL Nozha EL Gedida,
>>> Heliopolis, Cairo, Egypt
>>>
>>> Phone: +202 262 00 755 - +2 012 551 5551
>>>
>>> Fax: +202 262 00 755
>>>
>>> Mobile: +2 018 131 91 89
>>>
>>> john.zaka...@graphicano.com
>>>
>>> www.graphicano.com
>>>
>>>
>>
>> http://pastebin.com/cuXnT9Fb
>>
>> That contains some PHP classes which are based upon the WSDL file. The
>> conversion is with the sourceforge wsdl2php project (with some mods).
>>
>> In YOUR code ...
>>
>> <?php
>> // Include the classes which wrap the SOAP service for you.
>> require_once 'service.php';
>>
>> try
>> {
>> // Create a new Service (unforuntate name - maybe ReservationSystem
>> or something - Service is VERY generic).
>> $Service = new Service();
>>
>> // Let's do a tour search.
>> $TourSearchRequest = new TourSearch();
>>
>> // Populate the TourSearchRequest.
>> $TourSearchRequest->date = '2010/01/01';
>>
>> // Run the search.
>> $TourSearchResponse = $Service->TourSearch($TourSearchRequest);
>>
>> // Dump the response (expecting it to be of class TourSearchResponse.
>> var_dump($TourSearchResponse);
>> }
>>
>> catch(Exception $ex)
>> {
>> // Dump the exception, taking note of faultstring and faultcode as
>> these are SOAP Server generated errors.
>> var_dump($ex);
>> }
>> ?>
>>
>> But this is generating a SOAP exception on the server, so the client
>> code won't help here.
>>
>> ["faultstring"]=>string(96) "Server was unable to process request.
>> ---> Object reference not set to an instance of an object."
>> ["faultcode"]=>string(11) "soap:Server"
>> ["detail"]=>string(0) ""
>>
>> How are you building the WSDL file? By hand? If so, I would recommend
>> learning about using DocBlocks and a tool to auto generate the WSDL
>> file.
>>
>> I use a modified version of Zend's SOAP, WSDL and AutoDiscovery tools
>> to build my WSDL files from my source code.
>>
>> I then use a modified sourceforge's wsdl2php project to convert the
>> wsdl file to normal PHP classes which do all the wrapping of the SOAP
>> comms for me and let's me use normal PHP coding as if all the services
>> were local and not on a remote server.
>>
>> Richard.
>>
>>
>>
>> --
>> -----
>> Richard Quadling
>> "Standing on the shoulders of some very clever giants!"
>> EE : http://www.experts-exchange.com/M_248814.html
>> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
>> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
>> ZOPA : http://uk.zopa.com/member/RQuadling
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
REST is a concept, not a protocol (as I understand it), so you cannot
just create a service and supply a contract file. You have to document
the service in some other way and then the users have to write all the
code.
If there was a REST+DocBlock => wsdl_like_file then I could take the
wsdl_like_file and produce my classes to access your service. I
wouldn't need to care about the protocol.
In fact, using the Zend framework as I've suggested, I've not written
a single line of XML parsing, or header extraction or anything. Just
talked to some local classes as if there was no distance between the
client and the server.
Client_class extends base_soap_client_class <=> base_soap_server_class
extended by Server_Class
SOAP has it's faults, but it is a standard of sorts and that certainly
helps third parties know they are writing to a standard.
But SOAP has more overhead admittedly and in some cases it may not be ideal.
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
--- End Message ---
--- Begin Message ---
On Tue, Jun 15, 2010 at 10:14 AM, Richard Quadling <rquadl...@gmail.com> wrote:
> REST is a concept, not a protocol (as I understand it), so you cannot
> just create a service and supply a contract file. You have to document
> the service in some other way and then the users have to write all the
> code.
I know it's a concept, but using that concept as the "language" or
"data transport" and the data format being JSON. I could try to map
these to OSI model or TCP/IP model levels but I can't be bothered. I
just find SOAP to be too bloated and an annoyance to work with.
I mean, technically, a SOAP request is "RESTful" too since it can use
POST or GET... but I don't like to consider it RESTful :)
--- End Message ---
--- Begin Message ---
Sent from losPhone
On Jun 15, 2010, at 7:08 AM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote:
On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote:
On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote:
Karl,
Which app are you talking about?
Regards,
Shreyas
On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers
<k...@designdrumm.com>wrote:
Hey,
I just found this app that I think will do your single user
login. It is a
MySQL monitoring app called MySQL Query Analyzer. It has the
functionality I
think you were looking for. Might be worth a "look-see".
:))
Hth,
Karl
I think he means MySQL Query Analyzer, but I'm not sure how that is
an answer to the question though!
Thanks,
Ash
http://www.ashleysheridan.co.uk
Yes. MySQL Query Analyzer.
I read that it has single user login capability.
Is that not what you were wanting?
Karl DeSaulniers
Design Drumm
http://designdrumm.com
Erm...
According to mysql.com it's for Java and .Net (no mention of PHP)
and it
doesn't look like the source is released, so you can't reverse
engineer
it, so I don't see how it's an answer to the OP's question.
Thanks,
Ash
http://www.ashleysheridan.co.uk
Darn. I missed that part.
Well, sry for getting your hopes up.
I thought I was on to something.
Is there the off chance he could mix JavaScript with his site and this
program to control his users?
Karl
--- End Message ---
--- Begin Message ---
On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote:
>
> Sent from losPhone
>
> On Jun 15, 2010, at 7:08 AM, Ashley Sheridan
> <a...@ashleysheridan.co.uk> wrote:
>
> > On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote:
> >
> >> On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote:
> >>
> >>> On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote:
> >>>>
> >>>> Karl,
> >>>>
> >>>> Which app are you talking about?
> >>>>
> >>>> Regards,
> >>>> Shreyas
> >>>>
> >>>> On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers
> >>>> <k...@designdrumm.com>wrote:
> >>>>
> >>>>> Hey,
> >>>>> I just found this app that I think will do your single user
> >>>> login. It is a
> >>>>> MySQL monitoring app called MySQL Query Analyzer. It has the
> >>>> functionality I
> >>>>> think you were looking for. Might be worth a "look-see".
> >>>>>
> >>>>> :))
> >>>>>
> >>>>> Hth,
> >>>>> Karl
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>> I think he means MySQL Query Analyzer, but I'm not sure how that is
> >>> an answer to the question though!
> >>>
> >>> Thanks,
> >>> Ash
> >>> http://www.ashleysheridan.co.uk
> >>>
> >>>
> >>
> >>
> >> Yes. MySQL Query Analyzer.
> >> I read that it has single user login capability.
> >> Is that not what you were wanting?
> >>
> >>
> >> Karl DeSaulniers
> >> Design Drumm
> >> http://designdrumm.com
> >>
> >
> >
> > Erm...
> >
> > According to mysql.com it's for Java and .Net (no mention of PHP)
> > and it
> > doesn't look like the source is released, so you can't reverse
> > engineer
> > it, so I don't see how it's an answer to the OP's question.
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
>
> Darn. I missed that part.
> Well, sry for getting your hopes up.
> I thought I was on to something.
>
> Is there the off chance he could mix JavaScript with his site and this
> program to control his users?
>
> Karl
>
No, because Java and Javascript are not the same thing at all, and this
program doesn't control user logins, it's for analysing MySQL queries,
hence its name!
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Sent from losPhone
On Jun 15, 2010, at 12:37 PM, Karl DeSaulniers <k...@designdrumm.com>
wrote:
Sent from losPhone
On Jun 15, 2010, at 7:08 AM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote:
On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote:
On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote:
Karl,
Which app are you talking about?
Regards,
Shreyas
On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers
<k...@designdrumm.com>wrote:
Hey,
I just found this app that I think will do your single user
login. It is a
MySQL monitoring app called MySQL Query Analyzer. It has the
functionality I
think you were looking for. Might be worth a "look-see".
:))
Hth,
Karl
I think he means MySQL Query Analyzer, but I'm not sure how that is
an answer to the question though!
Thanks,
Ash
http://www.ashleysheridan.co.uk
Yes. MySQL Query Analyzer.
I read that it has single user login capability.
Is that not what you were wanting?
Karl DeSaulniers
Design Drumm
http://designdrumm.com
Erm...
According to mysql.com it's for Java and .Net (no mention of PHP)
and it
doesn't look like the source is released, so you can't reverse
engineer
it, so I don't see how it's an answer to the OP's question.
Thanks,
Ash
http://www.ashleysheridan.co.uk
Darn. I missed that part.
Well, sry for getting your hopes up.
I thought I was on to something.
Is there the off chance he could mix JavaScript
Oops meant Java
with his site and this program to control his users?
Karl
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Sent from losPhone
On Jun 15, 2010, at 12:41 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote:
Sent from losPhone
On Jun 15, 2010, at 7:08 AM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote:
On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote:
On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote:
Karl,
Which app are you talking about?
Regards,
Shreyas
On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers
<k...@designdrumm.com>wrote:
Hey,
I just found this app that I think will do your single user
login. It is a
MySQL monitoring app called MySQL Query Analyzer. It has the
functionality I
think you were looking for. Might be worth a "look-see".
:))
Hth,
Karl
I think he means MySQL Query Analyzer, but I'm not sure how that
is
an answer to the question though!
Thanks,
Ash
http://www.ashleysheridan.co.uk
Yes. MySQL Query Analyzer.
I read that it has single user login capability.
Is that not what you were wanting?
Karl DeSaulniers
Design Drumm
http://designdrumm.com
Erm...
According to mysql.com it's for Java and .Net (no mention of PHP)
and it
doesn't look like the source is released, so you can't reverse
engineer
it, so I don't see how it's an answer to the OP's question.
Thanks,
Ash
http://www.ashleysheridan.co.uk
Darn. I missed that part.
Well, sry for getting your hopes up.
I thought I was on to something.
Is there the off chance he could mix JavaScript with his site and
this
program to control his users?
Karl
No, because Java and Javascript are not the same thing at all, and
this
program doesn't control user logins, it's for analysing MySQL queries,
hence its name!
Thanks,
Ash
http://www.ashleysheridan.co.uk
Ok.
I was referring to this.
The enhanced MySQL Query Analyzer is available via the latest release
of MySQL Enterprise at the Gold and Platinum subscriber levels. The
latest release of MySQL Enterprise also includes:
Improved Enterprise Monitor security with read-only user role and
single sign-on capabilities through LDAP integration
Are they talking about single user access to this program? I should
have read more before posting. Sry all. Just trying to help.
Karl
--- End Message ---
--- Begin Message ---
On Tue, 2010-06-15 at 12:51 -0500, Karl DeSaulniers wrote:
>
> Sent from losPhone
>
> On Jun 15, 2010, at 12:41 PM, Ashley Sheridan
> <a...@ashleysheridan.co.uk> wrote:
>
> > On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote:
> >
> >>
> >> Sent from losPhone
> >>
> >> On Jun 15, 2010, at 7:08 AM, Ashley Sheridan
> >> <a...@ashleysheridan.co.uk> wrote:
> >>
> >>> On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote:
> >>>
> >>>> On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote:
> >>>>
> >>>>> On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote:
> >>>>>>
> >>>>>> Karl,
> >>>>>>
> >>>>>> Which app are you talking about?
> >>>>>>
> >>>>>> Regards,
> >>>>>> Shreyas
> >>>>>>
> >>>>>> On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers
> >>>>>> <k...@designdrumm.com>wrote:
> >>>>>>
> >>>>>>> Hey,
> >>>>>>> I just found this app that I think will do your single user
> >>>>>> login. It is a
> >>>>>>> MySQL monitoring app called MySQL Query Analyzer. It has the
> >>>>>> functionality I
> >>>>>>> think you were looking for. Might be worth a "look-see".
> >>>>>>>
> >>>>>>> :))
> >>>>>>>
> >>>>>>> Hth,
> >>>>>>> Karl
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>> I think he means MySQL Query Analyzer, but I'm not sure how that
> >>>>> is
> >>>>> an answer to the question though!
> >>>>>
> >>>>> Thanks,
> >>>>> Ash
> >>>>> http://www.ashleysheridan.co.uk
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> Yes. MySQL Query Analyzer.
> >>>> I read that it has single user login capability.
> >>>> Is that not what you were wanting?
> >>>>
> >>>>
> >>>> Karl DeSaulniers
> >>>> Design Drumm
> >>>> http://designdrumm.com
> >>>>
> >>>
> >>>
> >>> Erm...
> >>>
> >>> According to mysql.com it's for Java and .Net (no mention of PHP)
> >>> and it
> >>> doesn't look like the source is released, so you can't reverse
> >>> engineer
> >>> it, so I don't see how it's an answer to the OP's question.
> >>>
> >>> Thanks,
> >>> Ash
> >>> http://www.ashleysheridan.co.uk
> >>>
> >>>
> >>
> >> Darn. I missed that part.
> >> Well, sry for getting your hopes up.
> >> I thought I was on to something.
> >>
> >> Is there the off chance he could mix JavaScript with his site and
> >> this
> >> program to control his users?
> >>
> >> Karl
> >>
> >
> >
> > No, because Java and Javascript are not the same thing at all, and
> > this
> > program doesn't control user logins, it's for analysing MySQL queries,
> > hence its name!
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
>
> Ok.
> I was referring to this.
> The enhanced MySQL Query Analyzer is available via the latest release
> of MySQL Enterprise at the Gold and Platinum subscriber levels. The
> latest release of MySQL Enterprise also includes:
>
> Improved Enterprise Monitor security with read-only user role and
> single sign-on capabilities through LDAP integration
> Are they talking about single user access to this program? I should
> have read more before posting. Sry all. Just trying to help.
>
>
> Karl
Yeah, it's access to that software! lol
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
On Jun 15, 2010, at 12:52 PM, Ashley Sheridan wrote:
On Tue, 2010-06-15 at 12:51 -0500, Karl DeSaulniers wrote:
Sent from losPhone
On Jun 15, 2010, at 12:41 PM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote:
Sent from losPhone
On Jun 15, 2010, at 7:08 AM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote:
On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote:
On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote:
Karl,
Which app are you talking about?
Regards,
Shreyas
On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers
<k...@designdrumm.com>wrote:
Hey,
I just found this app that I think will do your single user
login. It is a
MySQL monitoring app called MySQL Query Analyzer. It has the
functionality I
think you were looking for. Might be worth a "look-see".
:))
Hth,
Karl
I think he means MySQL Query Analyzer, but I'm not sure how that
is
an answer to the question though!
Thanks,
Ash
http://www.ashleysheridan.co.uk
Yes. MySQL Query Analyzer.
I read that it has single user login capability.
Is that not what you were wanting?
Karl DeSaulniers
Design Drumm
http://designdrumm.com
Erm...
According to mysql.com it's for Java and .Net (no mention of PHP)
and it
doesn't look like the source is released, so you can't reverse
engineer
it, so I don't see how it's an answer to the OP's question.
Thanks,
Ash
http://www.ashleysheridan.co.uk
Darn. I missed that part.
Well, sry for getting your hopes up.
I thought I was on to something.
Is there the off chance he could mix JavaScript with his site and
this
program to control his users?
Karl
No, because Java and Javascript are not the same thing at all, and
this
program doesn't control user logins, it's for analysing MySQL
queries,
hence its name!
Thanks,
Ash
http://www.ashleysheridan.co.uk
Ok.
I was referring to this.
The enhanced MySQL Query Analyzer is available via the latest release
of MySQL Enterprise at the Gold and Platinum subscriber levels. The
latest release of MySQL Enterprise also includes:
Improved Enterprise Monitor security with read-only user role and
single sign-on capabilities through LDAP integration
Are they talking about single user access to this program? I should
have read more before posting. Sry all. Just trying to help.
Karl
Yeah, it's access to that software! lol
Thanks,
Ash
http://www.ashleysheridan.co.uk
Ahhh. My appologies.
It was late when I read it.
:-/
Karl DeSaulniers
Design Drumm
http://designdrumm.com
--- End Message ---
--- Begin Message ---
Hi folks!
I'm kind of ashamed to ask a question, as I haven't followed this list very
much lately.
This isn't exactly a PHP question, but since mysql is the most popular
database engine used with php, I figured someone here might have an idea.
I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =>
A(uid,pid) and another table B, containing 3 fields. The picture ID, an
attribute ID and a value for that attribute => B(pid,aid,value).
Table B contains several rows for a single PID with various AIDs and values.
Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the
image size and AID = 3 always holding a value for the image type)
The goal is now to join table A on table B using pid, and selecting the rows
based on MULTIPLE attributes.
So the result should only contain rows for images, that relate to an
attribute ID = 1 (size) that is bigger than 100 AND!!!!!!! an attribute ID =
5 that equals 'jpg'.
I know that there is an easy solution to this, doing it in one query and I
have the feeling, that I can almost touch it with my fingertips in my mind,
but I can't go that final step, if you know what I mean. AND THAT DRIVES ME
CRAZY!!!!!!
I appreciate your thoughts on this.
Regards,
Jan
--- End Message ---
--- Begin Message ---
[Top-post.]
You'll probably have much better luck on the MySQL General list.
CC'ed on this email.
On Tue, Jun 15, 2010 at 20:58, Jan Reiter <the-fal...@gmx.net> wrote:
> Hi folks!
>
> I'm kind of ashamed to ask a question, as I haven't followed this list very
> much lately.
>
>
>
> This isn't exactly a PHP question, but since mysql is the most popular
> database engine used with php, I figured someone here might have an idea.
>
>
>
> I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =>
> A(uid,pid) and another table B, containing 3 fields. The picture ID, an
> attribute ID and a value for that attribute => B(pid,aid,value).
>
>
>
> Table B contains several rows for a single PID with various AIDs and values.
> Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the
> image size and AID = 3 always holding a value for the image type)
>
>
>
> The goal is now to join table A on table B using pid, and selecting the rows
> based on MULTIPLE attributes.
>
>
>
> So the result should only contain rows for images, that relate to an
> attribute ID = 1 (size) that is bigger than 100 AND!!!!!!! an attribute ID =
> 5 that equals 'jpg'.
>
>
>
> I know that there is an easy solution to this, doing it in one query and I
> have the feeling, that I can almost touch it with my fingertips in my mind,
> but I can't go that final step, if you know what I mean. AND THAT DRIVES ME
> CRAZY!!!!!!
>
>
>
> I appreciate your thoughts on this.
>
>
>
> Regards,
>
> Jan
>
>
--
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!
--- End Message ---
--- Begin Message ---
On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote:
> Hi folks!
>
> I'm kind of ashamed to ask a question, as I haven't followed this list very
> much lately.
>
>
>
> This isn't exactly a PHP question, but since mysql is the most popular
> database engine used with php, I figured someone here might have an idea.
>
>
>
> I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =>
> A(uid,pid) and another table B, containing 3 fields. The picture ID, an
> attribute ID and a value for that attribute => B(pid,aid,value).
>
>
>
> Table B contains several rows for a single PID with various AIDs and values.
> Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the
> image size and AID = 3 always holding a value for the image type)
>
>
>
> The goal is now to join table A on table B using pid, and selecting the rows
> based on MULTIPLE attributes.
>
>
>
> So the result should only contain rows for images, that relate to an
> attribute ID = 1 (size) that is bigger than 100 AND!!!!!!! an attribute ID =
> 5 that equals 'jpg'.
>
>
>
> I know that there is an easy solution to this, doing it in one query and I
> have the feeling, that I can almost touch it with my fingertips in my mind,
> but I can't go that final step, if you know what I mean. AND THAT DRIVES ME
> CRAZY!!!!!!
>
>
>
> I appreciate your thoughts on this.
>
>
>
> Regards,
>
> Jan
>
You'll be looking for something like this (untested):
SELECT * FROM a
LEFT JOIN b ON (a.pid = b.pid)
WHERE (b.aid = 1 AND b.value > 100) OR (b.aid = 3 AND b.value = 'jpg')
Obviously instead of the * you may have to change to a list of field
names to avoid fieldname collision on the two tables.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Thanks. That was my first attempt, too. Only this will throw out rows, that
meet only one of the conditions, too. For example, I would get all pictures
that are bigger than 100, regardless of type, and all pictures that are of type
jpg, no matter the size.
Doing it with a view would be an option, but that would immensely decrease
flexibility.
I guess I have to keep on cooking my brain on this ;-)
I think I did it before, a few years ago when MySQL didn't support views yet,
but I can't find that stuff ...
@Dan: Thanks for forwarding my mail to the MySQL List!
Regards,
Jan
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Wednesday, June 16, 2010 3:09 AM
To: Jan Reiter
Cc: php-gene...@lists.php.net
Subject: Re: [PHP] SQL Syntax
On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote:
Hi folks!
I'm kind of ashamed to ask a question, as I haven't followed this list very
much lately.
This isn't exactly a PHP question, but since mysql is the most popular
database engine used with php, I figured someone here might have an idea.
I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =>
A(uid,pid) and another table B, containing 3 fields. The picture ID, an
attribute ID and a value for that attribute => B(pid,aid,value).
Table B contains several rows for a single PID with various AIDs and values.
Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the
image size and AID = 3 always holding a value for the image type)
The goal is now to join table A on table B using pid, and selecting the rows
based on MULTIPLE attributes.
So the result should only contain rows for images, that relate to an
attribute ID = 1 (size) that is bigger than 100 AND!!!!!!! an attribute ID =
5 that equals 'jpg'.
I know that there is an easy solution to this, doing it in one query and I
have the feeling, that I can almost touch it with my fingertips in my mind,
but I can't go that final step, if you know what I mean. AND THAT DRIVES ME
CRAZY!!!!!!
I appreciate your thoughts on this.
Regards,
Jan
You'll be looking for something like this (untested):
SELECT * FROM a
LEFT JOIN b ON (a.pid = b.pid)
WHERE (b.aid = 1 AND b.value > 100) OR (b.aid = 3 AND b.value = 'jpg')
Obviously instead of the * you may have to change to a list of field names to
avoid fieldname collision on the two tables.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
On Wed, 2010-06-16 at 03:23 +0200, Jan Reiter wrote:
> Thanks. That was my first attempt, too. Only this will throw out rows, that
> meet only one of the conditions, too. For example, I would get all pictures
> that are bigger than 100, regardless of type, and all pictures that are of
> type jpg, no matter the size.
>
> Doing it with a view would be an option, but that would immensely decrease
> flexibility.
>
> I guess I have to keep on cooking my brain on this ;-)
>
> I think I did it before, a few years ago when MySQL didn't support views yet,
> but I can't find that stuff ...
>
> @Dan: Thanks for forwarding my mail to the MySQL List!
>
> Regards,
> Jan
>
>
> From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
> Sent: Wednesday, June 16, 2010 3:09 AM
> To: Jan Reiter
> Cc: php-gene...@lists.php.net
> Subject: Re: [PHP] SQL Syntax
>
> On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote:
>
> Hi folks!
>
> I'm kind of ashamed to ask a question, as I haven't followed this list very
> much lately.
>
>
>
> This isn't exactly a PHP question, but since mysql is the most popular
> database engine used with php, I figured someone here might have an idea.
>
>
>
> I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =>
> A(uid,pid) and another table B, containing 3 fields. The picture ID, an
> attribute ID and a value for that attribute => B(pid,aid,value).
>
>
>
> Table B contains several rows for a single PID with various AIDs and values.
> Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the
> image size and AID = 3 always holding a value for the image type)
>
>
>
> The goal is now to join table A on table B using pid, and selecting the rows
> based on MULTIPLE attributes.
>
>
>
> So the result should only contain rows for images, that relate to an
> attribute ID = 1 (size) that is bigger than 100 AND!!!!!!! an attribute ID =
> 5 that equals 'jpg'.
>
>
>
> I know that there is an easy solution to this, doing it in one query and I
> have the feeling, that I can almost touch it with my fingertips in my mind,
> but I can't go that final step, if you know what I mean. AND THAT DRIVES ME
> CRAZY!!!!!!
>
>
>
> I appreciate your thoughts on this.
>
>
>
> Regards,
>
> Jan
>
>
> You'll be looking for something like this (untested):
>
> SELECT * FROM a
> LEFT JOIN b ON (a.pid = b.pid)
> WHERE (b.aid = 1 AND b.value > 100) OR (b.aid = 3 AND b.value = 'jpg')
>
> Obviously instead of the * you may have to change to a list of field names to
> avoid fieldname collision on the two tables.
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
I think maybe your table structure could do with a little work, as it
doesn't lend itself to simple queries. It could probably be done the way
you need with sub-queries, but as the tables become more populated and
more people are triggering the queries, this is going to become very
slow.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
On Wed, 16 Jun 2010 02:58:31 +0200
"Jan Reiter" <the-fal...@gmx.net> wrote:
>
> I have 2 tables. Table A containing 2 fields. A user ID and a picture ID =>
> A(uid,pid) and another table B, containing 3 fields. The picture ID, an
> attribute ID and a value for that attribute => B(pid,aid,value).
>
>
>
> Table B contains several rows for a single PID with various AIDs and values.
> Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the
> image size and AID = 3 always holding a value for the image type)
>
>
>
> The goal is now to join table A on table B using pid, and selecting the rows
> based on MULTIPLE attributes.
>
>
>
> So the result should only contain rows for images, that relate to an
> attribute ID = 1 (size) that is bigger than 100 AND!!!!!!! an attribute ID =
> 5 that equals 'jpg'.
>
>
>
> I appreciate your thoughts on this.
>
>
>
> Regards,
>
> Jan
>
something like this (untested)
$sql = 'select * from a ';
$join = '';
$where = array();
//each condition 'column = X'
foreach($condition as $count=>$cond){
$join .= ' left join b as b'.$count' on a.pid=b'.$count.'.pid ';
$where[] = 'b'.$count'.'.'.$cond;
}
$sql .= $join.implode(' AND ', $where);
--
Simcha Younger <sim...@syounger.com>
--- End Message ---