AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
Zitat:
Delphi-Quellcode:
to be Pascal or SQL? It is just a string and can contain anything you like and will not be handled by Pascal or SQL. It is just a value
'AA:=1234; bbA'
|
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
Ja, stimmt schon.. Nicht gut hingeschaut..
Indeed.. the whole part in quotes is inserted in a field in the database so the Pascal ":=" does not matter nor affect anything. |
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
Just did some tests and still got the error
Code:
Still have error on the bottom line.
DROP TABLE IF EXISTS nodes;
CREATE TABLE nodes ( node_id int, parent_id int, bez TEXT, CONSTRAINT PK_nodes PRIMARY KEY (node_id), CONSTRAINT FK_nodes_parent FOREIGN KEY (parent_id) REFERENCES nodes (node_id) ) ENGINE=InnoDB; INSERT INTO nodes VALUES (1, NULL, 'A'); INSERT INTO nodes VALUES (2, 1, 'AA'); INSERT INTO nodes VALUES (3, NULL, 'B'); INSERT INTO nodes VALUES (4, 2, "AA=1234; bbA"); So not everything enclosed in quotes is passed as a string? :oops: Tom |
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
Hello Tom,
MySQL will not accept double quotes I guess. The double quotes are only valid from within Delphi. Your SQL statement should work if you quote the string in the last line just like the others. |
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
Hi,
Single quotes is how I had it before. Still with the error. Maybe it has something to do with the transfer of data between zeos and the tunnel php file. Tom |
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
I executed this in Heidisql without errors:
DROP TABLE IF EXISTS nodes; CREATE TABLE nodes ( node_id int, parent_id int, bez TEXT, CONSTRAINT PK_nodes PRIMARY KEY (node_id), CONSTRAINT FK_nodes_parent FOREIGN KEY (parent_id) REFERENCES nodes (node_id) ) ENGINE=InnoDB; INSERT INTO nodes VALUES (1, NULL, 'A'); INSERT INTO nodes VALUES (2, 1, 'AA'); INSERT INTO nodes VALUES (3, NULL, 'B'); INSERT INTO nodes VALUES (4, 2, 'AA=1234; bbA'); Maybe very stupid question but if the sql I post does not work for you, what happens if you replace the ";"? That could very well be a delimiter in the PHP tunnel.. |
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
I am using an sql tunnel demo from the 1st post.
I just need a way to connect to a mysql database using tunneling. I have not done a check but is Heidisql a sql tunnel? I am using Delphi 7 |
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
HeidiSql is a tool like phpMyadmin.
I have a few general suggestions: first is to replace the ";" with some different character. If that works, at least you know what the issue is. A quick work around: if you use stringreplace to replace ";" when posting and another stringreplace when retrieving the data, your problem should be worked around. |
AW: MySQL via PHP-Tunnel (über eigene libmysql.dll)
Thanks, yes I think I will test various characters that I can set on the way to the database and reset on the way out.
Tom |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:33 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz