the problem i am having with the tables is that the data inside them is getting duplicated each the user enters a new image and it is then displaying the images more than once on the screen. could i get round this with the following code
IF EXISTS(SELECT TABLE_NAME)
CREATE TABLE_NAME ( column_1 int, column_2 varchar(30))
INSERT T1 (column_2, column_1) VALUES ('Row #1',1)
each time the user will access the pages that interact with the table they will first delete the table and create the table again thus creating a empty table each time data needs to be entered into it?
would this be the correct code to use t drop the table and then create the table after it has been dropped.
IF EXISTS DROP TABLE images_tad;
$sql="CREATE TABLE IF NOT EXISTS `images_tad` (
`id` INT NOT NULL AUTO_INCREMENT,
`tad1` varchar (250) not null,
`tad2` varchar(250) not null,
`tad3` varchar(250) not null,
`tad4` varchar(250) not null,
`tad5` varchar(250) not null,
primary key (id)
mysql_query($sql) or die (mysql_error());
Do you want only 1 image to be inserted at a time for all the users ? That is, if user A uploads an image, then delete the table, create the table again, insert the values to the table. Then if user B uploads an image, again, delete the table, create the table again and insert the values to the table ? If thats the case, why not truncate the table instead of dropping it ?
i was looking at the truncate table command but it is just as easy to do either i think and it would have the same outcome would it not.
if i create a page which deletes the tables and only include this once at the top of the first upload page this should in theory give the user a new tanble each time they want to start uploading the new images.
the data does not need to be kept in the tables as each time the user will be using it it will be sending out a new e-mail with new images attached to it.
Hi, I am a newbie in developing a website. i have tried to connect using mysqli conncetion
Here is my simple code.
// db.php code
//$con = mysqli_connect("localhost","root","","bakery"); ...
If you're in one of those predicaments where cls.__private attributes just aren't enough since they can easily be accessed through inst._cls__private, and you need something a little more secure, here's ...