[nycphp-talk] Script or method to "junk" a table(s)?
Daniel Convissor
danielc at analysisandsolutions.com
Mon Jul 31 14:00:28 EDT 2006
On Wed, Jul 26, 2006 at 10:10:11PM -0400, Jon Baer wrote:
> Does anyone know of any easy script/way to junk a table?
>
> Im trying to think of a simple solution that while you are developing
> a schema/app to easily fill it with test data, not really something
> like fixtures in rails but something that can figure if you have
> varchar(x), char(x), int(x), blob, etc and fill it with -n rows.
I know you must have thought of the following, but what's the problem with
it?
<?php
$rows = 55;
for ($i = 0, $i < $rows, $i++) {
query('insert into foo values (...)');
}
Or just have test rows in your table creation script.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list