PhotShop help PhotShop help
 

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

Main Menu

PhotShop help

Started by Hot Rides, June 04, 2008, 07:13:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hot Rides

Can someone help explain this line to me
$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

Stramm

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

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

Stramm

commented out means it's not getting used
That's the query run instead
$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

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

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

Stramm

probably no database joins possible...
you can check if you add in photo_shop_admin.php right after
function photo_shop_fetch_orders($box, $sort_codes, $sort, $lower_limit, $orders_per_page){
global $CONFIG, $udb_var;

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


Hot Rides

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

Stramm

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)