X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to make product.tpl as the real first page ? (https://forum.x-cart.com/showthread.php?t=19478)

Jon 01-29-2006 10:04 PM

I'm sorry, it's late at night. This one will work, I promise :D

Code:

$productid = func_query_first("SELECT productid from $sql_tbl[products] WHERE 1 ORDER BY productid DESC LIMIT 1");
$productid = $productid[productid];


Chuchen 01-29-2006 10:11 PM

:D This time I've got this message :

"If the page is not updated in a 5 seconds, please follow this link: continue >> INVALID SQL: 1064 : 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 'WHERE 1 ORDER BY productid DESC LIMIT 1' at line 1
SQL QUERY FAILURE: SELECT productid from WHERE 1 ORDER BY productid DESC LIMIT 1


If the page is not updated in a 5 seconds, please follow this link: continue >>"

(sorry to bother you Jon :oops: )

This is the code :

Code:

define('OFFERS_DONT_SHOW_NEW',1);
require "./auth.php";


$productid = func_query_first("SELECT productid from $sql_tbl[xc_products] WHERE 1 ORDER BY productid DESC LIMIT 1");
$productid = $productid[productid];

#
# Put all product info into $product array
#


Jon 01-29-2006 10:16 PM

Don't change this code:

Code:

$sql_tbl[products]

Chuchen 01-29-2006 10:19 PM

Everything works great now ! Thank you Jon ! :D

Ah damned, there is a mistake on the top of the home.php page. I can read "If the page is not updated in a 5 seconds, please follow this link: continue >>" 8O

Jon 01-30-2006 07:05 AM

I've tested my exact code on 4.0.x and it should not cause the problem, there must be something else going on, sorry you're on your own from here.

Chuchen 01-30-2006 08:18 AM

No problem Jon, I will try to see if I can do something about that. Thank you again for help :D


All times are GMT -8. The time now is 11:51 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.