php-windows Digest 4 Jan 2004 11:47:05 -0000 Issue 2066
Topics (messages 22462 through 22467):
Shopping Cart Woes!!
22462 by: kaizer boab
Re: GD2 function issue
22463 by: Svensson, B.A.T. (HKG)
22464 by: choinet
22465 by: Svensson, B.A.T. (HKG)
22466 by: choinet
22467 by: Svensson, B.A.T. (HKG)
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I am trying to build a shopping cart for my college project. I am able to
display items from the database, add items to the cart, but I am unable to
view the items that are in the cart. In my "view_cart.php" page I receive
the following error:
"You have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near 'IN (64) ORDER BY
dvd.dvd_title ASC' at line 1".
The error appears to be from this part of my script:
$query = 'SELECT * FROM dvd IN (';
foreach ($_SESSION['cart'] as $key => $value) {
$query .= $key . ',';
}
$query = substr ($query, 0, -1) . ') ORDER BY dvd.dvd_title ASC';
$result = mysql_query ($query) or die(mysql_error());
Could someone please tell why the query is not working?
Thanks in advance.
--- End Message ---
--- Begin Message ---
Choinet wrote: "When you reply to all, please only use
the mailing list address, as I received four emails from
your two replies."
That's the way it works for all of use. Or do you want
to claim this to be a bug to? ;) :)
Anyhow, on to your explanation. What you now say is
that you would like to change the spcification of the
beahviour of the code, and that is NOT the same thing
as having found a bug!
Hypoteticaly: if they changes the soure code according to
your specification, it might work for you, but then php
code will fail for others developper who is dependent on
the present specification. Nice for you, but not so nice
for other developers.
php is open source, so if you really really need this
change, the download the souce code and make the changes
that suits you.
//Anders
-----Original Message-----
From: choinet
To: [EMAIL PROTECTED]
Sent: 2004-01-03 17:47
Subject: RE: [PHP-WIN] Re: GD2 function issue
When you reply to all, please only use the mailing
list address, as I received four emails from your two
replies. Anyway, I am still claiming the original
problem. I feel that changing the listseparator
character from space to, say, semicolon (which has no
place in pathnames), or to leave the space and simply
modify the logic in the source code would solve the
problem. We'll see what Boutell advises :D
--- "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
wrote:
>If spaces already has a defined semantic (e.g.
multiple fonts),
>then you can't claim a bug by redefining the
>semantics of that
>space character. We need some order, don't we. :)
--- "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
wrote:
> First you claim "the bug is that spaces cannot be
> used in the font
> pathname", now you seams to claim something else. I
> am a bit confused.
>
> What's your point?
>
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
--- "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
wrote:
> Choinet wrote: "When you reply to all, please only
> use
> the mailing list address, as I received four emails
> from
> your two replies."
>
> That's the way it works for all of use. Or do you
> want
> to claim this to be a bug to? ;) :)
>
Actually, all you have to do is reply to all and then
remove the other addresses until only the
[EMAIL PROTECTED] address is remaining. That
way, everyone gets one email of it. Looks like you did
it right this time, so I'm not complaining :)
> Anyhow, on to your explanation. What you now say is
> that you would like to change the spcification of
> the
> beahviour of the code, and that is NOT the same
> thing
> as having found a bug!
>
We are already past that issue. Note that I refer to
it as a problem now.
> Hypoteticaly: if they changes the soure code
> according to
> your specification, it might work for you, but then
> php
> code will fail for others developper who is
> dependent on
> the present specification. Nice for you, but not so
> nice
> for other developers.
>
Well, a change like this would help more than it
hurts, considering there is an extremely large PHP
user base. Anyway, I also stated to let there be
alternatively be additional logic that checks to see
if the untokenized font path works, if a different
listseparator character cannot satisfy the current
conditions.
> php is open source, so if you really really need
> this
> change, the download the souce code and make the
> changes
> that suits you.
>
> //Anders
>
It just so happens that documentation on compilation
of the php_gd2.dll for Windows is severely lacking
(which partially explains why my compiled dll doesn't
quite work) but theoretically, yes, I should be able
to customize the source code to my own liking.
However, this problem affects way too many people who
would use these functions for it simply to be
customized for myself.
Case in point is, I am still finding a way to resolve
this issue. Remember that if it is resolved, functions
using the code would be far more portable.
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
--- End Message ---
--- Begin Message ---
I don't feel for argue about this.
You asked the readers of this list for a comments on weather you were
correct or not on weather your bug report was a true bug or not. It is quit
obviouse that it is not a bug report. Its more like a "request for change".
Period.
On your problems with the lack of documentation for compiling DLL's:
If you have such a poor compiler documentation which does not tell you how
to use feature X when you need to, then I would suggest you to change to a
compiler wich actually tells you how to do that - for instance Borland C/C++
or MS C++ devstudio.
Another way would be to specify which compiler you use and just ask here on
how to do it.
-----Original Message-----
From: choinet
To: [EMAIL PROTECTED]
Sent: 2004-01-03 23:05
Subject: RE: [PHP-WIN] Re: GD2 function issue
--- "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
wrote:
> Choinet wrote: "When you reply to all, please only
> use
> the mailing list address, as I received four emails
> from
> your two replies."
>
> That's the way it works for all of use. Or do you
> want
> to claim this to be a bug to? ;) :)
>
Actually, all you have to do is reply to all and then
remove the other addresses until only the
[EMAIL PROTECTED] address is remaining. That
way, everyone gets one email of it. Looks like you did
it right this time, so I'm not complaining :)
> Anyhow, on to your explanation. What you now say is
> that you would like to change the spcification of
> the beahviour of the code, and that is NOT the same
> thing as having found a bug!
>
We are already past that issue. Note that I refer to
it as a problem now.
> Hypoteticaly: if they changes the soure code
> according to
> your specification, it might work for you, but then
> php
> code will fail for others developper who is
> dependent on
> the present specification. Nice for you, but not so
> nice
> for other developers.
>
Well, a change like this would help more than it
hurts, considering there is an extremely large PHP
user base. Anyway, I also stated to let there be
alternatively be additional logic that checks to see
if the untokenized font path works, if a different
listseparator character cannot satisfy the current
conditions.
> php is open source, so if you really really need
> this
> change, the download the souce code and make the
> changes
> that suits you.
>
> //Anders
>
It just so happens that documentation on compilation
of the php_gd2.dll for Windows is severely lacking
(which partially explains why my compiled dll doesn't
quite work) but theoretically, yes, I should be able
to customize the source code to my own liking.
However, this problem affects way too many people who
would use these functions for it simply to be
customized for myself.
Case in point is, I am still finding a way to resolve
this issue. Remember that if it is resolved, functions
using the code would be far more portable.
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Svennson, thank you for your passionate response; I
think we have already reached a consensus on the issue
of semantics.
On the issue of compiling, it is not the lack of
documentation for the compiler which is preventing me
from compiling a suitable php_gd2.dll, but rather the
instructions for compiling that dll itself. I am using
Visual C++ 6.0 and plan on upgrading to Visual Studio
.NET 2003 soon. I realize that the GDlib requires the
FreeType, libjpeg, and libpng libraries (libpng itself
requires zlib). After having tried this, the dll is
missing about 40KB of data and is missing many, if not
all, references to zlib when decompiled. I used the
latest versions of the libraries at
gnuwin32.sourceforge.net. I suspect that the zlib.lib
file in the win32build folder needs to be of the same
version as the zlib package, but it's only a guess.
Anyway, it would be a waste to be discussing all this
when there is no resolution to the problem, right?
Well, according to the bug report, someone posted
this: "I mentioned this to Thomas Boutell when I
learned about it; GD_Lib 2.0.18 is expected to use a
semicolon ';' as path separator instead of a space."
I'm not sure if this is true, but if it is, thanks to
whomever did this on the PHP users' behalf. I actually
suggested to Thomas in an email that GDlib use a
semicolon as the listseparator, modeled after its use
as a path separator in Windows.
So, I guess the issue is soon to be resolved, except
now I'm hoping for an explanation on how to compile
the php_gd2.dll for Windows. I would highly appreciate
it if you or anyone else on the list would list the
appropriate steps for compiling php_gd2.dll for
Windows using Visual C++/Studio for 6.0 and/or .NET.
--- "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
wrote:
> I don't feel for argue about this.
>
> You asked the readers of this list for a comments on
> weather you were
> correct or not on weather your bug report was a true
> bug or not. It is quit
> obviouse that it is not a bug report. Its more like
> a "request for change".
> Period.
>
>
> On your problems with the lack of documentation for
> compiling DLL's:
>
> If you have such a poor compiler documentation which
> does not tell you how
> to use feature X when you need to, then I would
> suggest you to change to a
> compiler wich actually tells you how to do that -
> for instance Borland C/C++
> or MS C++ devstudio.
>
> Another way would be to specify which compiler you
> use and just ask here on
> how to do it.
>
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
--- End Message ---
--- Begin Message ---
Is your problem that you don't know which libraries
to include, or is it that the linker complains about
unresolved external references?
-----Original Message-----
From: choinet
To: [EMAIL PROTECTED]
Sent: 2004-01-04 05:41
Subject: RE: [PHP-WIN] Re: GD2 function issue
.NET 2003 soon. I realize that the GDlib requires the
FreeType, libjpeg, and libpng libraries (libpng itself
requires zlib). After having tried this, the dll is
missing about 40KB of data and is missing many, if not
all, references to zlib when decompiled. I used the
latest versions of the libraries at
gnuwin32.sourceforge.net. I suspect that the zlib.lib
file in the win32build folder needs to be of the same
version as the zlib package, but it's only a guess.
--- End Message ---