php-general Digest 20 Aug 2006 23:24:29 -0000 Issue 4304
Topics (messages 240913 through 240927):
PHP & BEA Weblogic 8.1
240913 by: BKruger
syntax error help
240914 by: Bigmark
240916 by: Paul Scott
240917 by: chris smith
240918 by: Bigmark
240919 by: Bigmark
240921 by: Peter Lauri
Re: Shopping cart
240915 by: Ryan A
240926 by: afan.afan.net
Re: Dhtml/javasript layer tips or software (0.T)
240920 by: tedd
240922 by: tedd
240923 by: Robert Cummings
240924 by: tedd
240925 by: Robert Cummings
Script timing out.
240927 by: Tom Ray [Lists]
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 ---
Could anyone please direct me to installation instructions for PHP on BEA
Weblogic 8.1?
Tx
BK
--- End Message ---
--- Begin Message ---
Can anyone tell me why this works on my localhost but gets an error on my
server:
<?php
$sql = "SELECT COUNT(*) FROM leaderboard WHERE points >=( SELECT points FROM
leaderboard WHERE username= '$username' )";
$result = mysql_query( $sql ) or die ( mysql_error() );
$rank = mysql_result( $result, 0 );
echo $rank;
?>
this is the error message but i cant figure it out:
Your Position 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
'SELECT points FROM leaderboard WHERE username= 'ainslie' )' at
--- End Message ---
--- Begin Message ---
On Sun, 2006-08-20 at 18:18 +0800, Bigmark wrote:
> Can anyone tell me why this works on my localhost but gets an error on my
> server:
>
Try quote your identifiers.
SELECT COUNT(*) FROM `leaderboard` WHERE `points` >=( SELECT `points`
FROM
`leaderboard` WHERE `username` = '$username' );
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm
--- End Message ---
--- Begin Message ---
On 8/20/06, Bigmark <[EMAIL PROTECTED]> wrote:
Can anyone tell me why this works on my localhost but gets an error on my
server:
<?php
$sql = "SELECT COUNT(*) FROM leaderboard WHERE points >=( SELECT points FROM
leaderboard WHERE username= '$username' )";
$result = mysql_query( $sql ) or die ( mysql_error() );
$rank = mysql_result( $result, 0 );
echo $rank;
?>
this is the error message but i cant figure it out:
Your Position 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
'SELECT points FROM leaderboard WHERE username= 'ainslie' )' at
They are different mysql versions.
Your localhost version is 4.1+ which supports sub-selects, the other
one is 4.0 or below.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
It works now: I replaced the last part of the sql with a variable
<?php
$sql = "SELECT COUNT(*) FROM leaderboard WHERE points >= $my_points ";
$result = mysql_query( $sql ) or die ( mysql_error() );
$rank = mysql_result( $result, 0 );
echo $rank;
?>
""Bigmark"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can anyone tell me why this works on my localhost but gets an error on my
> server:
>
> <?php
> $sql = "SELECT COUNT(*) FROM leaderboard WHERE points >=( SELECT points
> FROM
> leaderboard WHERE username= '$username' )";
> $result = mysql_query( $sql ) or die ( mysql_error() );
> $rank = mysql_result( $result, 0 );
> echo $rank;
> ?>
>
>
> this is the error message but i cant figure it out:
>
> Your Position 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
> 'SELECT points FROM leaderboard WHERE username= 'ainslie' )' at
--- End Message ---
--- Begin Message ---
It works now: I replaced the last part of the sql with a variable
<?php
$sql = "SELECT COUNT(*) FROM leaderboard WHERE points >= $my_points ";
$result = mysql_query( $sql ) or die ( mysql_error() );
$rank = mysql_result( $result, 0 );
echo $rank;
?>
""Bigmark"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can anyone tell me why this works on my localhost but gets an error on my
> server:
>
> <?php
> $sql = "SELECT COUNT(*) FROM leaderboard WHERE points >=( SELECT points
> FROM
> leaderboard WHERE username= '$username' )";
> $result = mysql_query( $sql ) or die ( mysql_error() );
> $rank = mysql_result( $result, 0 );
> echo $rank;
> ?>
>
>
> this is the error message but i cant figure it out:
>
> Your Position 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
> 'SELECT points FROM leaderboard WHERE username= 'ainslie' )' at
--- End Message ---
--- Begin Message ---
Check the version of MySQL, I think sub queries came in version 4.1 and you
are using that. So you probably have a version>=4.1 at localhost, and <4.1
at your server.
/Peter
-----Original Message-----
From: Bigmark [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 20, 2006 5:19 PM
To: [email protected]
Subject: [PHP] syntax error help
Can anyone tell me why this works on my localhost but gets an error on my
server:
<?php
$sql = "SELECT COUNT(*) FROM leaderboard WHERE points >=( SELECT points FROM
leaderboard WHERE username= '$username' )";
$result = mysql_query( $sql ) or die ( mysql_error() );
$rank = mysql_result( $result, 0 );
echo $rank;
?>
this is the error message but i cant figure it out:
Your Position 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
'SELECT points FROM leaderboard WHERE username= 'ainslie' )' at
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Thanks,
Will check it out.
Am also looking at "viart shop", any insight from
someone who has used it would be helpful.
Cheers!
Ryan
--- Larry Garfield <[EMAIL PROTECTED]> wrote:
> OSCommerce is crap. Don't bother.
>
> <obligatory plug>
>
> The Drupal CMS has a complete suite of ecommerce
> modules that work with it.
> I've not worked with it recently, but if you just
> need a straightforward
> shopping cart it should be fine.
>
> http://drupal.org/
> http://drupal.org/project/ecommerce
>
> All GPLed.
>
> </obligatory plug>
>
> On Saturday 19 August 2006 10:37, Ryan A wrote:
> > Hey,
> > I have been long enough on this list to know this
> > shopping cart question comes up real often and
> > irritates a lot of folks, but sorry, I have
> checked
> > google and hotscripts and it has come down to a
> > recommendation from YOU guys as they are SOOOOO
> many
> > options out there with each cart most of which i
> will
> > never need.
> >
> > Feel free to mention commercial products as I have
> > been looking at them too, but if i go in for a
> > commercial solution I will have to cut somewhere
> else
> > as this is for myself and i'm starting
> out...budgets
> > low and am trying to do everything myself, but
> dont
> > have time to make this myself.
> >
> > Will be selling spare parts.
> >
> > I dont want a cart to do a million things, just
> around
> > 10 :)
> >
> > 1. Admin panel where i enter quantity and it keeps
> > track of inventry
> > 2. Should be *fast* (php+mysql solution)
> > 3.Intergrate with paypal+2checkout anything more
> is a
> > bonus
> > 4. Easy to "template"
> > 5. Calculates shipping (not vital, but bonus if it
> > does)
> > 6. Should be able to give discounts based on price
> and
> > accept discount codes.
> > 7. Should offer the "customers who bought this
> also
> > bought" feature
> > 8. Easy to maintain
> >
> > OSC is the first cart that comes to mind, followed
> by
> > Zen, xcart (xcart out of my budget though)
> >
> > Am leaning towards OSC for the price but its got
> an
> > overload of bulk and speed problems...
> >
> > Please recommend, even a link to any site and a
> "go to
> > that f***ing site" (the = of a "RTFM") would be
> > appreciated.
> >
> > Thanks!
> > Ryan
> >
> > ------
> > - The faulty interface lies between the chair and
> the keyboard.
> > - Creativity is great, but plagiarism is faster!
> > - Smile, everyone loves a moron. :-)
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
>
> --
> Larry Garfield AIM: LOLG42
> [EMAIL PROTECTED] ICQ: 6817012
>
> "If nature has made any one thing less susceptible
> than all others of
> exclusive property, it is the action of the thinking
> power called an idea,
> which an individual may exclusively possess as long
> as he keeps it to
> himself; but the moment it is divulged, it forces
> itself into the possession
> of every one, and the receiver cannot dispossess
> himself of it." -- Thomas
> Jefferson
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- End Message ---
--- Begin Message ---
While OSC is mentioned: I use OSC (actually CRE Loaded version:
http://www.creloaded.com) for a last 2-3 years and installed several
shoping carts. And, they, more or less, work fine. Though, what drives me
nuts, instalation sometime goes wrong with missing file, or after patc I
have manually to delete some files to make it work... And, what scares me
the most, on their forum you can find a tons of installation
questions/problems. And most of them will stay unanswered.
The reason I shoosed OSC is it was so easy make my own changes and
"versions", comparing to xcart (I installed two of those too and they look
fine and stable to me).
My question is actually, your opinion about OSC and/or CRE Loaded, safety,
support and, of course, how the application is coded (as friend of mine
told me once "the worst code ever written that works fine" :)).
Thanks.
-afan
> OSCommerce is crap. Don't bother.
>
> <obligatory plug>
>
> The Drupal CMS has a complete suite of ecommerce modules that work with
> it.
> I've not worked with it recently, but if you just need a straightforward
> shopping cart it should be fine.
>
> http://drupal.org/
> http://drupal.org/project/ecommerce
>
> All GPLed.
>
> </obligatory plug>
>
> On Saturday 19 August 2006 10:37, Ryan A wrote:
>> Hey,
>> I have been long enough on this list to know this
>> shopping cart question comes up real often and
>> irritates a lot of folks, but sorry, I have checked
>> google and hotscripts and it has come down to a
>> recommendation from YOU guys as they are SOOOOO many
>> options out there with each cart most of which i will
>> never need.
>>
>> Feel free to mention commercial products as I have
>> been looking at them too, but if i go in for a
>> commercial solution I will have to cut somewhere else
>> as this is for myself and i'm starting out...budgets
>> low and am trying to do everything myself, but dont
>> have time to make this myself.
>>
>> Will be selling spare parts.
>>
>> I dont want a cart to do a million things, just around
>> 10 :)
>>
>> 1. Admin panel where i enter quantity and it keeps
>> track of inventry
>> 2. Should be *fast* (php+mysql solution)
>> 3.Intergrate with paypal+2checkout anything more is a
>> bonus
>> 4. Easy to "template"
>> 5. Calculates shipping (not vital, but bonus if it
>> does)
>> 6. Should be able to give discounts based on price and
>> accept discount codes.
>> 7. Should offer the "customers who bought this also
>> bought" feature
>> 8. Easy to maintain
>>
>> OSC is the first cart that comes to mind, followed by
>> Zen, xcart (xcart out of my budget though)
>>
>> Am leaning towards OSC for the price but its got an
>> overload of bulk and speed problems...
>>
>> Please recommend, even a link to any site and a "go to
>> that f***ing site" (the = of a "RTFM") would be
>> appreciated.
>>
>> Thanks!
>> Ryan
>>
>> ------
>> - The faulty interface lies between the chair and the keyboard.
>> - Creativity is great, but plagiarism is faster!
>> - Smile, everyone loves a moron. :-)
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>
> --
> Larry Garfield AIM: LOLG42
> [EMAIL PROTECTED] ICQ: 6817012
>
> "If nature has made any one thing less susceptible than all others of
> exclusive property, it is the action of the thinking power called an idea,
> which an individual may exclusively possess as long as he keeps it to
> himself; but the moment it is divulged, it forces itself into the
> possession
> of every one, and the receiver cannot dispossess himself of it." --
> Thomas
> Jefferson
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
At 1:49 PM -0400 8/18/06, Robert Cummings wrote:
-snip-
BTW, this is not PHP, but I'm feeling benevolent today ;)
You can get benevolent any time you want -- thanks for the code. :-)
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
At 1:49 PM -0400 8/18/06, Robert Cummings wrote:
-snip-
I'll leave it to you as an exercise to adapt it properly in PHP using
variables and loops instead of harded coded content :) BTW, this is not
PHP, but I'm feeling benevolent today ;)
Cheers,
Rob.
As a minor addition to Rob's code:
http://xn--ovg.com/a_exam
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On Sun, 2006-08-20 at 09:53 -0400, tedd wrote:
> At 1:49 PM -0400 8/18/06, Robert Cummings wrote:
> >-snip-
> >I'll leave it to you as an exercise to adapt it properly in PHP using
> >variables and loops instead of harded coded content :) BTW, this is not
> >PHP, but I'm feeling benevolent today ;)
> >
> >Cheers,
> >Rob.
>
> As a minor addition to Rob's code:
>
> http://xn--ovg.com/a_exam
That's cool... but now I need to think of which circle of hell you
belong in for bastardizing my indentation and tabbing ;)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
At 10:36 AM -0400 8/20/06, Robert Cummings wrote:
On Sun, 2006-08-20 at 09:53 -0400, tedd wrote:
At 1:49 PM -0400 8/18/06, Robert Cummings wrote:
>-snip-
>I'll leave it to you as an exercise to adapt it properly in PHP using
>variables and loops instead of harded coded content :) BTW, this is not
>PHP, but I'm feeling benevolent today ;)
>
>Cheers,
>Rob.
As a minor addition to Rob's code:
http://xn--ovg.com/a_exam
That's cool... but now I need to think of which circle of hell you
belong in for bastardizing my indentation and tabbing ;)
Cheers,
Rob.
Rob:
Ain't it cool that we all get to do our own thing? I certainly would
not like conforming to someone else's formatting scheme -- mine may
be more verbose, but it makes sense to me.
That's one of the advantages of freelancing, besides picking where
you want to starve.
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On Sun, 2006-08-20 at 10:41 -0400, tedd wrote:
> At 10:36 AM -0400 8/20/06, Robert Cummings wrote:
> >On Sun, 2006-08-20 at 09:53 -0400, tedd wrote:
> >> At 1:49 PM -0400 8/18/06, Robert Cummings wrote:
> >> >-snip-
> >> >I'll leave it to you as an exercise to adapt it properly in PHP using
> >> >variables and loops instead of harded coded content :) BTW, this is not
> >> >PHP, but I'm feeling benevolent today ;)
> >> >
> >> >Cheers,
> >> >Rob.
> >>
> >> As a minor addition to Rob's code:
> >>
> >> http://xn--ovg.com/a_exam
> >
> >That's cool... but now I need to think of which circle of hell you
> >belong in for bastardizing my indentation and tabbing ;)
> >
> >Cheers,
> >Rob.
>
>
> Rob:
>
> Ain't it cool that we all get to do our own thing? I certainly would
> not like conforming to someone else's formatting scheme -- mine may
> be more verbose, but it makes sense to me.
You did notice I had a smiley right? It was meant in jest :)
> That's one of the advantages of freelancing, besides picking where
> you want to starve.
Starve? Hmm, I'm not having that problem. Though I did when I first
started and had no customers *lol*. Mind you while I was startving I had
lots of time to write InterJinn.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
I just installed PHP Open Chat and I'm getting an error when I log in
about the script being unresponsive. Anyone ever run into this? Or could
shed a light as to what causes this error? I've never seen it come up
before.....I'm running PHP 4.4.2/Apache 2.0.5
--- End Message ---