vmError: Couldnt create thumb, file not found after update - sql

Hello I updated my Joomla from 2.5 to 3.5 and VM2 to VM3. Everything so far is working but in some products of VirtueMart I get this error vmError: Couldnt create thumb, file not found after update and when I click on the product I get this one:
YOU HAVE AN ERROR IN YOUR SQL SYNTAX; CHECK THE MANUAL THAT CORRESPONDS TO YOUR MARIADB SERVER VERSION FOR THE RIGHT SYNTAX TO USE NEAR 'NATURA"" ORDER BY PRODUCT_NAME DESC, VIRTUEMART_PRODUCT_ID DESC LIMIT 1' AT LINE 1 SQL=SELECT P.VIRTUEMART_PRODUCT_ID, L.PRODUCT_NAME,L.PRODUCT_NAME FROM #__VIRTUEMART_PRODUCTS AS P INNER JOIN #__VIRTUEMART_PRODUCTS_EL_GR AS L USING (VIRTUEMART_PRODUCT_ID) LEFT JOIN #__VIRTUEMART_PRODUCT_SHOPPERGROUPS AS PS ON P.VIRTUEMART_PRODUCT_ID = PS.VIRTUEMART_PRODUCT_ID LEFT JOIN #__VIRTUEMART_PRODUCT_CATEGORIES AS PC ON P.VIRTUEMART_PRODUCT_ID = PC.VIRTUEMART_PRODUCT_ID WHERE ( PC.VIRTUEMART_CATEGORY_ID = 1 AND ( PS.VIRTUEMART_SHOPPERGROUP_ID= "1" OR PS.VIRTUEMART_SHOPPERGROUP_ID IS NULL ) AND P.PUBLISHED="1" ) AND P.VIRTUEMART_PRODUCT_ID!="78" AND L.PRODUCT_NAME <= "ΠΟΔΟΜΑΚΤΡΑ ΒΕΛΟΥΤΕ "NATURA"" ORDER BY PRODUCT_NAME DESC, VIRTUEMART_PRODUCT_ID DESC LIMIT 1
What can i do to fix this?

it was the ", i rename the product and now i don't get error on sql.

Related

Prestashop problem with product combinations

I've added a few products with product combinations but when I select one in the frontend I get this error:
An error occurred while processing your request
In the logs I found this sql error
PrestaShopDatabaseException]
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 ') GROUP BY pac.id_product_attribute ' at line 8
SELECT
pac.`id_product_attribute`
FROM
`ps_product_attribute_combination` pac
INNER JOIN `ps_product_attribute` pa ON pa.id_product_attribute = pac.id_product_attribute
WHERE
pa.id_product = 73
AND pac.id_attribute IN ()
GROUP BY
pac.id_product_attribute
HAVING
COUNT(pa.id_product) = 0 LIMIT 1
I am using prestashop 1.7.6.0
Can anyone help me please?
Thanks

Oracle ora-00907 missing right parenthesis

What's wrong with the code?
I got error ora-00907 missing right parenthesis
SELECT
(SELECT AMOUNT FROM LATERAL (SELECT cro.AMOUNT
FROM some_schema.cred cro
WHERE cro.cr_id = co.cr_id) WHERE ROWNUM = 1)
FROM some_schema.cred_oper co
ORACLE version 11.2.0.4.0
LATERAL is only available in 12c and later versions of Oracle. I'm not sure what you're attempting to do here, but it appears your query can be simplified to:
SELECT cro.AMOUNT
FROM some_schema.cred cro
INNER JOIN some_schema.cred_oper co
ON cro.cr_id = co.cr_id
WHERE ROWNUM = 1
Best of luck.
i think your query will be like below
SELECT
(
SELECT sum(cro.AMOUNT)
FROM some_schema.cred cro
WHERE cro.cr_id = co.cr_id
) as amount
FROM some_schema.cred_oper co

"Error: Unexpected, Please Try Again" with GoogleBigQuery JOIN

I know this is an older issue with Google BigQuery, but it seems the problem had been fixed # mid 2013. I wanted to know if there has been any recent workarounds/fixes to this issue in the recent months. Here is my query from the google sample data.
SELECT publicdata:samples.natality.mother_age, publicdata:samples.gsod.station_number
FROM [publicdata:samples.natality]
INNER JOIN [publicdata:samples.gsod]
ON publicdata:samples.gsod.year = publicdata:samples.natality.year
LIMIT 100
Query Failed
Error: Unexpected. Please try again.
Job ID: deft-grammar-553:job_eUkW4EhgNvlJPuWPoP1bLL7Ra_w
Thanks for the report! That error message should be improved.
In the meantime: The same query using table aliases works well (though I had to change the JOIN to JOIN EACH to deal with the size of both tables).
Instead of:
SELECT publicdata:samples.natality.mother_age, publicdata:samples.gsod.station_number
FROM [publicdata:samples.natality]
INNER JOIN [publicdata:samples.gsod]
ON publicdata:samples.gsod.year = publicdata:samples.natality.year
LIMIT 100
Do:
SELECT a.mother_age, b.station_number
FROM [publicdata:samples.natality] a
INNER JOIN EACH [publicdata:samples.gsod] b
ON a.year = b.year
LIMIT 100

join and group by query works in firebird 2.1 but not in 1.5

I have the following query that works fine in firebird 2.1, however I cannot get it to work on a db with the exact same structure in 1.5
select c.printchecknumber, v.voidamount
from checks c
join (select checknumber, sum(voidamount) as voidamount
from checkitem
where voidtype =1
group by checknumber) v on c.checknumber = v.checknumber
order by c.printchecknumber
Any ideas?
The error message is
Invalid token
Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 61
the error is at the start of the second select
I'm guessing that Firebird 1.5 doesn't support subqueries in the from clause. In any case, you can write this as a simpler query. The following should do what you want:
select c.printchecknumber, sum(voidamount) as voidamount
from checkitem ci join
checks c
on ci.checknumber = c.checknumber
where ci.voidtype =1
group by c.printchecknumber;
EDIT:
If you want to include checkid, then this might work:
select c.printchecknumber, c.checkid, sum(voidamount) as voidamount
from checkitem ci join
checks c
on ci.checknumber = c.checknumber
where ci.voidtype =1
group by c.printchecknumber, c.checkid;
I don't know why it does not work on an earlier system and I'd need to know the error message to help, but the following would work on any sql which supports the over() clause which I believe firebird does with 3.0
select c.printchecknumber,
sum(v.voidamount) over (partition by printchecknumber)
from checks c
join checkitem v on c.checknumber = v.checknumber and v.voidtype = 1

sql joining as alias does not working

i am new to sql joins.. i have project that is 5 year old . Now i have to deploy it some new server .so deploy it to other server there i am facing some sql problem. here is the qyery .
SELECT DISTINCT d.*,DATE_FORMAT(d.downloads_updated, '%c/%d/%Y') AS updated,DATE_FORMAT(d.downloads_created, '%c/%d/%Y') AS created, s2.strings_english as title, s2.strings_english as description
FROM strings s, downloads d,
products_has_downloads pd
inner JOIN strings s2 ON d.downloads_description = s.strings_id WHERE d.downloads_id = pd.downloads_id AND s.strings_id = d.downloads_title AND d.downloads_status = 'Live' AND d.downloads_level = 'Public'
ORDER BY d.downloads_updated DESC LIMIT 5
i am getting this error
1054 - Unknown column 'd.downloads_description' in 'on clause'
i have not written this sql query.it is working fine on old server .
I am new to join and database .please can any one help me .
You are mixing both implicit and explicit join syntax which will not work.
You have the following implicit syntax where the tables are joined by commas:
FROM strings s, downloads d, products_has_downloads pd
The JOIN syntax has a higher precedence to the comma syntax so the alias for downloads is not available in the ON clause.
Try using all of the same syntax. I changed your query to use only explicit JOIN syntax:
SELECT DISTINCT d.*,
DATE_FORMAT(d.downloads_updated, '%c/%d/%Y') AS updated,
DATE_FORMAT(d.downloads_created, '%c/%d/%Y') AS created,
s2.strings_english as title,
s2.strings_english as description
FROM strings s
INNER JOIN downloads d
ON d.downloads_description = s.strings_id
INNER JOIN products_has_downloads pd
on d.downloads_id = pd.downloads_id
inner JOIN strings s2
on s2.strings_id = d.downloads_title
WHERE d.downloads_status = 'Live'
AND d.downloads_level = 'Public'
ORDER BY d.downloads_updated DESC
LIMIT 5