Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: PhotShop help  (Read 5513 times)

0 Members and 1 Guest are viewing this topic.

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
PhotShop help
« on: June 04, 2008, 07:13:07 pm »

Can someone help explain this line to me
Code: [Select]
$result = cpg_db_query("SELECT s.*, u.user_name, u.user_email  FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$CONFIG['TABLE_USERS']} as u ON u.user_id = s.uid WHERE oid=".$oid." AND cd=1 LIMIT 1;");
my coppermine install does not like it one bit. I beleive something does not mesh with my bridge to smf
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: PhotShop help
« Reply #1 on: June 04, 2008, 07:54:00 pm »

Absolutely correct... that query can only be run in a non bridged environment.
But why don't you use the latest version of the shop plugin but an over two years old one?

from the changelog...
Quote
New version (1.2 uploaded on 10/03/2006)
 - added bridge compatibility (should work without the need to configure anything, beta status)
 - added a paypal gateway (configure and enable it in include/gateway.inc.php, beta status)
 - fixed 2 bugs related to the shipping costs addition

actual version is 1.3.6

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: PhotShop help
« Reply #2 on: June 04, 2008, 07:58:13 pm »

thats from 1.3.6, its just commented out with //
but its still calling it from somewhere
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: PhotShop help
« Reply #3 on: June 04, 2008, 08:05:24 pm »

commented out means it's not getting used
That's the query run instead
Code: [Select]
$sql = "SELECT s.*, u.{$udb_var['field']['username']}, u.{$udb_var['field']['email']}  FROM {$CONFIG['TABLE_SHOP']} AS s LEFT JOIN {$udb_var['usertable']} as u ON u.{$udb_var['field']['user_id']} = s.uid WHERE oid=".$oid." AND cd=1 LIMIT 1";


More I can't tell you as an error report like 'my coppermine install does not like it one bit' is as cryptic to me as the query probably to you.

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: PhotShop help
« Reply #4 on: June 04, 2008, 08:18:29 pm »

whenever clicking on 'shop' or 'my orders', the two spots that have the code, it gives an error

Code: [Select]
Critical error

There was an error while processing a database query.


While executing query "SELECT s.*, u.memberName, u.emailAddress  FROM cpg_shop AS s LEFT JOIN `dodgeste_smf2`.smf_members as u ON u.ID_MEMBER = s.uid WHERE aktive=0 AND cd=1 ORDER BY oid DESC LIMIT 0, 25" on

mySQL error:



File: /home/dodgeste/public_html/copp_test/include/functions.inc.php - Line: 248

 

the odd thing is that the query it says its running is commented out with //, I even tried re-installing with the entire string deleted from both files using it and the same effect. somewhere its still calling the string although I can not find it
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: PhotShop help
« Reply #5 on: June 04, 2008, 08:38:06 pm »

probably no database joins possible...
you can check if you add in photo_shop_admin.php right after
Code: [Select]
function photo_shop_fetch_orders($box, $sort_codes, $sort, $lower_limit, $orders_per_page){
global $CONFIG, $udb_var;
the following
Code: [Select]
if ($udb_var['can_join_tables'] == 1) {
echo "Should work";
return;
}  else {
echo "no joins possible";
return;
}

And no worries... the commented out code isn't called, it's other code (the one I mentioned above... in the method function photo_shop_fetch_orders())

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: PhotShop help
« Reply #6 on: June 04, 2008, 08:48:43 pm »

no joins possible
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: PhotShop help
« Reply #7 on: June 04, 2008, 09:30:36 pm »

I just noticed with that test code in there, the 'shop' menu starts working partially, it seems like not all of it loaded though
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: PhotShop help
« Reply #8 on: June 04, 2008, 10:03:13 pm »

Means it's not working for you. Databse joins do not work and I've not written code for that case.

If you need it working, there are 2 ways to go.
1. write the needed code
2. have the forum and cpg tables in one database (probably the easier one)
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.