Date: 05/21/01
- Next message: Che Gonzalez: "RE: [PHP-WIN] Sockets problems in php"
- Previous message: JayAchTee: "Re: [PHP-WIN] php4 and iis5"
- Maybe in reply to: Anthony Darby: "[PHP-WIN] INSERT INTO TABLE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[> Replace MY_TABLE_HERE with INTO TABLE '$t' and I get nothing.]
Try -> MY_TABLE_HERE with INTO TABLE $t
^^^
(Gid rid of single quotes....)
John
---------------------
John Asendorf - jasendorf <email protected>
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aliquando et insanire iucundum est
> -----Original Message-----
> From: Anthony Darby [mailto:adarby <email protected>]
> Sent: Monday, May 21, 2001 4:10 AM
> To: PHP Win
> Subject: [PHP-WIN] INSERT INTO TABLE
>
>
> Hello,
>
> I have a select box which grabs table names as in the first snippit of
> code.
> I then have an INSERT statement which loads a text file I
> specifiy in a
> text field into the selected table .
> This executes on PHP_SELF submit.
>
> If I replace '$t' with INTO TABLE MY_TABLE_HERE, I get an
> insert and the
> table is populated as required without a hitch.
> Replace MY_TABLE_HERE with INTO TABLE '$t' and I get nothing.
>
> Any suggestions on this one?
>
> Thanks in advance,
>
> Tony
>
> --------- snip -----------------------
>
> <select name="table">
> <?
> $result = mysql_list_tables ($DB);
> $i = 0;
> while ($i < mysql_num_rows ($result)) {
> $tb_names[$i] = mysql_tablename($result, $i);
> echo "<option value=" . strtoupper($tb_names[$i]) . ">" .
> strtoupper($tb_names[$i]) . "</option>";
> $i++;
> }
> ?>
> </select>
>
> ----snippit 2 ------------------------
>
> $p=trim(addslashes($path));
> $t=trim($table);
> if(!($result=mysql_db_query($DB, "LOAD DATA INFILE '$p' INTO
> TABLE '$t'
> FIELDS TERMINATED BY '|' LINES TERMINATED BY ';'")))
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe <email protected>
> For additional commands, e-mail: php-windows-help <email protected>
> To contact the list administrators, e-mail:
> php-list-admin <email protected>
>
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Che Gonzalez: "RE: [PHP-WIN] Sockets problems in php"
- Previous message: JayAchTee: "Re: [PHP-WIN] php4 and iis5"
- Maybe in reply to: Anthony Darby: "[PHP-WIN] INSERT INTO TABLE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

