About dbi_query too long[already resolve]
dbi_query(dbc,"CREATE TABLE IF NOT EXISTS `%s` (`Username` VARCHAR(32) NOT NULL......................................... ............................................. ........................
is too long, now, i try new query[1024] new len = 0 len += format(query[len],512,"........" len += format(query[len],512-len,.............. but Error: Input line too long (after substitutions) on line 109 why ? how ? please!!!:cry::cry: |
Re: About dbi_query too long
now ,is not any err
but can't creat table please ,help me ! new query[1024] new len = 0 len += format(query[len],512,"CREATE TABLE IF NOT EXISTS `%s` ....",tbl_table) len += format(query[len],512-len,".........") len += format(query[len],512-len,".........") dbi_query(g_dbc,"%s",query) where is wrong ? |
Re: About dbi_query too long
STOP IT! OMG... Patient is the "Key"! Just wait
|
Re: About dbi_query too long
Have you tried examining your script closely and seeing that maybe you forgot to change an arg in format?
|
Re: About dbi_query too long
Thanks everyone,SQL is right,i think
for example: new query[2048] new len = 0 len += format(query[len], 256,"CREATE TABLE IF NOT EXISTS `%s` (`Username` VARCHAR(32) NOT NULL,`date` TIMESTAMP(10) NOT NULL ,",tbltable) len += format(query[len], 256-len,"`password` INT NOT NULL ,") len += format(query[len], 256-len,"PRIMARY KEY (`password`))") dbi_query(g_dbc,"%s",query) but can't creat table,it's wrong ??? |
Re: About dbi_query too long
hahahaha,already resolve!
not "256-len", 256 is too short, use 800-len thanks hlep of everyone |
Re: About dbi_query too long[already resolve]
Why not use the length of the string. In your above example, try 2047 instead of 256. Now, since you figured it out, decrease the length of query to save memory
|
Re: About dbi_query too long[already resolve]
thanks ,you are right!
"new query[800]" is better than "new query[2048]" I try ! |
Re: About dbi_query too long[already resolve]
Also, have the length of the string when you declare it 1 higher than the max you are planning to use. So, if you are telling it to use up to 800 characters, define it as having 801. This allows for it to add the terminating "/0" in the last spot so the complier knows that it is a string and not an array
|
| All times are GMT -4. The time now is 01:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.