2023-08-22, 02:41 PM
(2023-08-22, 02:28 PM)Laird Wrote: So, it was the PREPARE query generating the error all along. But why?
What does this show if you run it just before the PREPARE query?
SELECT @query;
I get the same "Access Denied" error.
So the full 5th query is:
SELECT COUNT(*)
INTO @exist
FROM information_schema.columns
WHERE table_schema = database()
AND
column_name = 'tyl_tnumtyls'
AND
table_name = 'REDACTED_threads';
SET @query = IF(@exist <= 0,
"
ALTER TABLE REDACTED_threads
ADD tyl_tnumtyls int(100) NOT NULL default '0'
",
"SET @dummy1 = 1"
);
SELECT @query;
PREPARE stmt FROM @query;
EXECUTE stmt;
and the first 2 parts run no problem .... just the last 3 lines create the "Access Denied"
Could it be something to do with the server security I have set?
Fact is Laird ... your code did the job and did it VERY quickly even on 3.5 million likes
Maybe I just should do the TYL update and then run the first set of queries you created?
Or I am happy to continue trying whatever you wish to sort it out?
Either way mate .... You Are A STAR