|
|
Tables List of Categories
Page 1 Page 2
- What are the types of data that can be stored?
- How do I read a list of current tables in a database?
- Do you have a script that will assist me?
-
What are the types of data that can be stored?
See our new FAQ on Data types and Definitions for more information.
Types are specified using a definition when either creating or altering a table. The most common are VARCHAR(length) and INT(length) where length is a number that specifies how many characters can be stored within the column. Below is (or will soon be) a full list and a short description for each. Remember, when using INT, that any value inserted into the database that begins with a 0 (zero) will have the zero dropped. In such cases where you will need the preceding zeros to be stored, you should use VARCHAR() instead.
Type |
Description |
TINYINT(length) |
An integer with a value range of 0 - 255. And a signed range of -128 to +127. Can also be INT1(length) |
SMALLINT(length) |
An integer with a value range of 0 - 65535. And a signed range of -32768 to +32767. Can also be INT2(length) |
-
How do I read a list of current tables in a database?
Try using the listtables function
@tables = $VAR{db}->listtables
The function has been deprecated and will not work with all servers. $VAR{db} is of course the connection variable.
$VAR{db} = Mysql->connect($DBHOST, $DBNAME, $DBUSER, $DBPASS);
-
Do you have a script that will assist me?
Yes, we use MySQL Mate
Page 1 Page 2
|
|
|