I have and old PHP5 web thats use mysql_connect (I know it's deprecated). I changed it to a new server and it starts failing.
After checking it, I found the problem is the mysql_insert_id function.
AFAIK, It's supossed to get the last autoincrement generated ID from SQL insert query, but if I...
Thanks GriffMG, I added that and this too:
DO WHILE ATC(" .t.",lcConsulta)>0
lcConsulta=STUFFC( lcConsulta,ATC(" .t.",lcConsulta),4,',1.0')
ENDDO
DO WHILE ATC(" .f.",lcConsulta)>0
lcConsulta=STUFFC( lcConsulta,ATC(" .f.",lcConsulta),4,'(0.0')
ENDDO
Because it has some queries like:
SELECT *...
I finally change code to make the replace only when .t. is behind = and it seems its working now:
DO WHILE ATC("=.t.",lcConsulta)>0
lcConsulta=STUFFC( lcConsulta,ATC("=.t.",lcConsulta),4,'=1.0')
ENDDO
DO WHILE ATC("=.f.",lcConsulta)>0
lcConsulta=STUFFC(...
Commenting text doesn't work. Ie, it returns this query:
with replacement:
UPDATE usuarios SET cerrojo=1.0 WHERE nuser=2
with replacing code commented:
UPDATE usuarios SET cerrojo=.T. WHERE nuser=2
This last one fails because .T. should be '.T.', and even if I use '.T.', query don't fail but...
Found it.
There is a procedure in comdb called vfpamsql (vfp to mysql) that claims it changes selects from VFP to mysql.
Here is the code:
*!* Replacement of where's logical values
DO WHILE ATC(".t.",lcConsulta)>0
lcConsulta=STUFFC( lcConsulta,ATC(".t.",lcConsulta),3,'1.0')
ENDDO
DO WHILE...
Thanks all for your answers.
I forgot to mention that this is VFP7.
I'm using MySQL ODBC 5.3 unicode x86 driver. Tried with last version 8 and still the same, both unicode and ansi.
This software can work with MySQL and FoxPro database. I tested with Foxpro and I don't have this problem.
The...
I have a textbox to insert email address to mysql database.
Last day, entering an address like john.t.smith@gmail.com, I notice it saved it as john1.0smith@gmail.com.
It understand .t. and .f. as true or false, and change it to 1.0 and 0.0.
How could I solve this?
Thanks
Yes, it was Web Browser instead of windows browser, I fixed it.
Thanks StefanFoerner, your code works like a charm. Only that in my case the shortcut is Ctrl + Alt instead of Shift + Control
With Control + + I can autoadjust the columns
Thanks again
Regards.
I want to show in a form a folder content as if it were the windows explorer.
I could do it with the OLE Microsoft Web Browser control and this code in the form init:
lcFolderName = 'C:\tmp'
THIS.Olecontrol1.Navigate(lcFolderName)
This works like a charm: I can delete and rename...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.