@@ -66,11 +66,11 @@ CREATE TABLE `pexels` (
66
66
` size` varchar (255 ) DEFAULT NULL ,
67
67
` resolution` varchar (255 ) DEFAULT NULL ,
68
68
` tags` varchar (255 ) DEFAULT NULL ,
69
- ` type_id` int ( 3 ) DEFAULT ' 0' ,
69
+ ` type_id` tinyint ( 1 ) DEFAULT ' 0' ,
70
70
` chinese_tags` varchar (255 ) DEFAULT NULL ,
71
71
` thumb_name` varchar (255 ) DEFAULT NULL ,
72
72
` thumb_name2` varchar (255 ) DEFAULT NULL ,
73
- ` is_posted` int ( 255 ) DEFAULT ' 0' ,
73
+ ` is_posted` tinyint ( 1 ) DEFAULT ' 0' ,
74
74
PRIMARY KEY (` id` )
75
75
) ENGINE= InnoDB AUTO_INCREMENT= 37971 DEFAULT CHARSET= utf8;
76
76
@@ -94,13 +94,13 @@ CREATE TABLE `stocksnap` (
94
94
` width` int (11 ) DEFAULT NULL ,
95
95
` height` int (11 ) DEFAULT NULL ,
96
96
` chinese_tags` varchar (255 ) DEFAULT NULL ,
97
- ` type_id` int ( 11 ) DEFAULT NULL ,
97
+ ` type_id` tinyint ( 1 ) DEFAULT NULL ,
98
98
` tags` varchar (255 ) DEFAULT NULL ,
99
99
` created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
100
100
` file_size` char (10 ) DEFAULT NULL ,
101
101
` thumb_name` varchar (255 ) DEFAULT NULL ,
102
102
` thumb_name2` varchar (255 ) DEFAULT NULL ,
103
- ` posted` int ( 2 ) DEFAULT ' 0' ,
103
+ ` posted` tinyint ( 1 ) DEFAULT ' 0' ,
104
104
PRIMARY KEY (` id` ),
105
105
UNIQUE KEY ` id` (` img_id` ) USING BTREE
106
106
) ENGINE= InnoDB AUTO_INCREMENT= 81955 DEFAULT CHARSET= utf8;
@@ -118,9 +118,9 @@ CREATE TABLE `stockvault` (
118
118
` resolution` varchar (255 ) DEFAULT NULL ,
119
119
` created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ,
120
120
` chinese_tags` varchar (255 ) DEFAULT NULL ,
121
- ` is_posted` int ( 255 ) DEFAULT ' 0' ,
121
+ ` is_posted` tinyint ( 1 ) DEFAULT ' 0' ,
122
122
` thumb_name` varchar (255 ) DEFAULT NULL ,
123
- ` type_id` int ( 11 ) DEFAULT NULL ,
123
+ ` type_id` tinyint ( 1 ) DEFAULT NULL ,
124
124
` chinese_title` varchar (255 ) DEFAULT NULL ,
125
125
PRIMARY KEY (` id` )
126
126
) ENGINE= InnoDB AUTO_INCREMENT= 237592 DEFAULT CHARSET= utf8;
@@ -133,8 +133,8 @@ DELIMITER ;;
133
133
CREATE DEFINER= ` root` @` localhost` FUNCTION ` LastIndexOf` (` str` varchar (255 ),` mysubstr` varchar (255 )) RETURNS int (11 )
134
134
BEGIN
135
135
# Routine body goes here...
136
- DECLARE pos int (5 );
137
- DECLARE re_pos int (5 );
136
+ DECLARE pos int (11 );
137
+ DECLARE re_pos int (11 );
138
138
set re_pos = INSTR(REVERSE(str), REVERSE(mysubstr));
139
139
if re_pos = 0 THEN
140
140
RETURN 0 ;
0 commit comments