[NTLUG:Discuss] Find Files NOT containting 'string'
Stuart Johnston
sjohnston at vaultranet.com
Fri Nov 7 11:54:07 CST 2003
Robert Citek wrote:
>
> At 11:16 AM 11/7/2003 -0600, Stuart Johnston wrote:
>
>> What I really need is to find all html input tags whose maxlength
>> fields don't match up with the corresponding database column. Extra
>> Credit anyone? :)
>
>
> Rather than tell us what you are trying to do, can you show us with
> examples?
Ok, I would have two sets of input files:
An html file that contains things like:
<input name="name" type="text"
value="<%=$fields{name}%>" size="30" maxlength="100">
<input name="description" type="text"
value="<%=$fields{description}%>" size="30">
And a database definition file that looks like:
CREATE TABLE "groups" (
"g_id" SERIAL,
"name" character varying(50) NOT NULL,
"description" text,
);
The more I write this out, the more complicated it becomes but anway.
The maxlength of the 'name' field in html is 100 but it is 50 in the
database - this is bad. The 'description' field has no maxlength
setting in the html but that is ok because it is of type 'text' in the
database. However, there may be some html fields missing maxlengths
that do need them. Also, I have several (well, hundreds) html files and
several different database tables with no easy way to link them together.
In other words, I will probably have to do this mostly by hand or find
another solution.
Thanks,
Stuart Johnston
More information about the Discuss
mailing list