I am using Joomla 3.7.5. if I do some changes in configuration in some component in administration and want to save those changes it write me this:
error 1064 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 'ORDER BY group_id DESC LIMIT 1' at line 1
I tried fix database (in Extension > Manage > Database), but it didn't help. I think there is some mistake in database with group_id table, but I am not sure where or how to fix it.
I tried it also on some old backup and it write something similar:
error 1064 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 'ORDER BY group_id DESC LIMIT 1' at line 1 SQL=select group_id from #__user_usergroup_map where user_id = ORDER BY group_id DESC LIMIT 1
I haven't needed to change some settings in component configuration until now. So I am not sure for how long it is not able to save it without error 1064.
Any suggestions what to fix to repair this issue? I am not sure what is that mentioned Line 1 - is it line 1 in database or in some php file?
Thank you very much!
I know nothing about joomla but looking carefully at this part of your error message
select group_id from #__user_usergroup_map where user_id = ORDER BY group_id DESC LIMIT 1
leads me to suspect your problem is that the predicate in your where clause user_id = is incomplete. A proper where clause would look something like user_id = X where X is a constant or some other expression.
Also, this sort of question may be more appropriate for Server Fault
Related
I met this strange thing and want to understand how you handle it.
I am using Monaco editor to write sql query and then using node clickhouse library to run the query, so, in the editor, user entered this:
-- Explain
select * from table 1
and the query sent to clickhouse is this:
-- Explain\nselect * from table 1
But when running this, I got error
:"SyntaxError: Unexpected number in JSON at position 2\n at pa...
Seemed the comment here is causing the error.
Can you tell me how to put comment into the query and send to clickhouse to run?
Have you already found the solution to your problem?
Otherwise I can advise you to use the "multi-line comments" as follows:
/* Explain */
SELECT *
FROM table1
It gets around the problem to achieve the desired result.
When I'm trying to drop table then I'm getting error
SQL Error: ORA-00604: error occurred at recursive SQL level 2
ORA-01422: exact fetch returns more than requested number of rows
00604. 00000 - "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.
One possible explanation is a database trigger that fires for each DROP TABLE statement. To find the trigger, query the _TRIGGERS dictionary views:
select * from all_triggers
where trigger_type in ('AFTER EVENT', 'BEFORE EVENT')
disable any suspicious trigger with
alter trigger <trigger_name> disable;
and try re-running your DROP TABLE statement
I noticed following line from error.
exact fetch returns more than requested number of rows
That means Oracle was expecting one row but It was getting multiple rows. And, only dual table has that characteristic, which returns only one row.
Later I recall, I have done few changes in dual table and when I executed dual table. Then found multiple rows.
So, I truncated dual table and inserted only row which X value. And, everything working fine.
I know the post is old and solved, but maybe someone is facing or will face my situation, so I want to leave the aquired knowledge here, after deal with the error for a week. I was facing the error: "ORA-00604: error occurred at recursive SQL level 1" , but with the internal error: " ORA-06502: error: character string buffer too smal numeric or value", this happened only when I try to logon the database, and using an specific driver, trying to connect from an Visual Studio C# application, the weirdest thing on that moment was that I connect from SQLDeveloper or TOAD and everything worked fine.
Later I discovered that my machine name had this format "guillermo-aX474b5", then I proceed to rename it like this "guillermo" without the "-" and the other stuff, and it worked!! Looks like in some drivers and situations, ORACLE Database does'nt like the "-" in the LogOn connection.
Hope it helps!
While I am creating a table In MySql, I am getting an error. I don't know What the problem is, but it will be helpful if I understand the reason behinId it.
Query:
create table publish(
From varcahar(60),
To varchar(60)
);
ERROR 1064 (42000): 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 'From varcahar(60),To varchar(60))' at line 1
Several errors:
1.- From and To are reserverd words you need to escape them
2.- varcahr -> varchar
Final code:
create table publish(
`From` varchar(60),
`To` varchar(60)
);
It says varcahr(60) not varchar(60)
Spelling problem
create table publish(From varchar(60),To varchar(60));
This is the right one. You misspelled varchar
And also From and To are reserved words. Check this Reserved Words In MySql
Sure this has been asked before but I need help! My developer left me hanging with this error and I don't know how to fix it. Any help is greatly appreciated.
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 'select * from products_options where language_id = \'1\' order by products_optio' at line 1
select count(select * from products_options where language_id = \'1\' order by products_options_id) as total 1
[TEP STOP]
I get similar 1064 errors when I click on these links under catalog in the admin area below:
-Products Attributes
-Manufacturers
-Reviews
-Specials
-Featured Products
-Products Expected
-tags
SELECT Count(*) AS total_1
FROM Products_Options
WHERE language_id = 1
I just had an oracle9 database crash and it left me with a couple of .trc files. Some of them specified indexes that were out of kilter and i dropped and readded those indexes.
However, when I run:
ANALYZE TABLE TABLESPACE.TABLE VALIDATE STRUCTURE CASCADE;
I still get an error: ora_00900, sqlstate: 4200
This creates a .trc file with:
Table/Index row count mismatch
table 1172 : index 1250, 0
Index root = tsn: 9 rdba: 0x0240390b
What do I do with this information?
I found this link, however I'm not sure how to use it:
http://www.freelists.org/post/oracle-l/Table-index-mismatch-trace-file,1
The error says your indexes (perhaps not the ones you thought) are still bad.
From your link, if you run the query through SQL*PLUS it will ask for a rdba number. Enter the value from your error message '0x0240390b' (no quotes). This will return a file number and a block number.
SELECT dbms_utility.data_block_address_file(
to_number(trim(leading '0' from
replace('&&rdba','0x','')),'XXXXXXXX')
) AS rfile#,
dbms_utility.data_block_address_block(
to_number(trim(leading '0' from
replace('&&rdba','0x','')),'XXXXXXXX')
) AS block#
FROM dual;
Next run the following query:
select owner, segment_name, segment_type
from dba_segments
where header_file = <rfile#>
and header_block = <block#>
This will give you the offending index to be dropped and recreated.
To be honest, with an error like this I would recommend opening an SR with Oracle - you want to make sure you don't lose your data!