automatically executing query
I needed to combine two fields into one, so i executed this query
UPDATE Students SET
image1 = CONCAT(imagepat h, image1name);
This worked, but the problem is that whenever a new record is added i have to manually re-enter and execute the query, is there any way to achieve the same outcome (image1 = imagepath+image 1name) for all subsequent records that would be entered,...
User Profile
Collapse
-
Combining two fields
i want to combine two fields and have used the the following query
[CODE=mysql]UPDATE SudentInfo SET
image1name = CONCAT(imagepat h,UserName,'1') ;[/CODE]
this works but the thing is when a new record is added the query is not applied and i have to manually execute the query again.
Is there a way to automate this so that the query is applied to all subsequent records?
Cheers -
I briefly looked into storing the images on MySQL but the DB would be too big so the only way to do it would be storing the path.
Thanks for the link, i am trying it out....Leave a comment:
-
Automatically inserting image name in database
hi guys,
I am totally new to coding so please bare with me.
I have a file upload field in a form on a PHP page for users to upload pictures, i also have the following fields in my MySQL database
"image_fold er" - this contains a default value of the image folder in my root folder
"image_path " - this automatically combines the image_ folder with the image_name to generate the path to...
No activity results to display
Show More
Leave a comment: