I wrote a question in mysql and it's running in phpmyadmin, but gives me an error in PHP
There is an error in your SQL syntax; From your MySQL server version for the correct syntax to use the closest 'Docano, DocDet, Dotspay, Statement, DCR, (in case when DRCR =' Dr. 'then' AMO 'on Line 2
My query is in PHP:
$ sql = "set @ runtot: = 0; docno, docdate, doctype, narration, drcr, in case (in case When drcr = '(as the rest of the amount) in the form of a debit, as a credit, (cockat (ab ((@runtoot: = @resentiot + (in case when DCR =' CR 'happens) (DCR = 'CR')) * (In the form of equilibrium in the form of the amount * 1 end)), (case when the @rontot <0 then 'CR' and 'Dr.' end)) (Select docno, Docdate, doctype, statement, zodiac, dcr laser from where accode = 1), what is wrong with q1 ";
php? < P>
You have to use the transaction to execute several orders MySQL. You first make a varible and then execute another command. .
Only one function
mysql By using i_query you can only assign one command and command to
; .
When you paste the code into PHPMyAdmin, this will work, although it is still considered a transaction.
You can read more about it.
No comments:
Post a Comment