Jump to content

Recommended Posts

hello

i am not a newbie in mysql but it seems i am having an STUPID issue i cant solve....

 

this is my query :

 

  $sql33="INSERT INTO tbl_images (id_artist_img, name_image, img_path, thmb_img_path) VALUES ('".$id_artist."', '".$imagepath."', '".$file."', '".$save."');";

$sql33 = mysql_query($sql33,$db_connection) or die ("Immage not uploaded");

 

it gives me the DIE error(image not uploaded). i cant figure it why,because when i print the $sql33 , i receive the data.... :s

 

what is the problem ? thank you in advance

Link to comment
https://forums.phpfreaks.com/topic/149008-solved-mysql-insert/
Share on other sites

hello

thank you for your advice, i receive this error now :

 

Duplicate entry '127' for key 1: INSERT INTO tbl_images (id_artist_img, name_image, img_path, thmb_img_path) VALUES ('189', '1236808442.jpg', 'users/images/1236808442.jpg', 'users/images/thumbs/thmb_1236808442.jpg');

 

what should this mean ?

Link to comment
https://forums.phpfreaks.com/topic/149008-solved-mysql-insert/#findComment-782466
Share on other sites

thank you very much, that solved my problem :)

 

it was tinyint, hehe. i've put it to INT now.

do you suggest me what LENGHT should i put and what is the maximum ???

 

what happens if i reach the maximum number of user under INT ????

 

anyways,these were just additional questions :), thanks for solving my problem !

Link to comment
https://forums.phpfreaks.com/topic/149008-solved-mysql-insert/#findComment-782474
Share on other sites

As you have seen by yourself, when the maximum is reached, the table will stop accepting new entries (maximum for SIGNED TINYINT is 127)

 

To check maximum values for other datatypes consult the manual

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

 

Link to comment
https://forums.phpfreaks.com/topic/149008-solved-mysql-insert/#findComment-782485
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.