Questions tagged [zerofill]

38 questions
1
vote
0 answers

How can I make ID field in MySQL immutable

Is there are way to make ID fiels in MySql immutable? It's possible in postgreSQL using PGAdmin for example. ID field sets as primary key and auto incr but can be changed manually.
Vandal
  • 21
  • 2
1
vote
1 answer

Detecting zerofill in MySQL field with VS 2008 VB

Using .NET connector: http://dev.mysql.com/doc/refman/5.1/en/connector-net-ref.html A field is set in MySQL as: decimal(6) zerofill not null How can the "zerofill" flag be detected in VB?
lepe
  • 24,677
  • 9
  • 99
  • 108
1
vote
3 answers

Zerofill is lost when using mysqli->prepare()

Using: MySQL 5.1 + PHP 5.3.5 MySQL: id in "table" is defined as: mediumint(6) zerofill not null I get the expected result when using: $mysqli->query("SELECT id FROM table WHERE id = 1"); while($row = $ret->fetch_array(MYSQLI_ASSOC)) $arr[] =…
lepe
  • 24,677
  • 9
  • 99
  • 108
1
vote
1 answer

MariaDB Connector Removing Leading Zeros on ZEROFILL fields

I've just upgraded from MySQL 5.7 to MariaDB 10.3 and one functionality difference has me stumped. I have an index field that is of the following type: UserID | int(9) unsigned zerofill If I execute the following query: SELECT UserID FROM User…
src
  • 117
  • 1
  • 4
1
vote
0 answers

Zero in blank cells (pivot table)

How can I show zero value in a blank cell inside a pivot table from the Google Sheets? I know tha in MS Excel this is possible by right click on pivot table > Pivot table options but I don't know how to do it in google sheets
1
vote
0 answers

Generate Prefix Number ID with Condition By Group ID

First this is my table CREATE TABLE IF NOT EXISTS `group` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `member` ( …
Dj Uckie
  • 31
  • 1
  • 1
  • 4
0
votes
1 answer

How to forward fill the non-NULL values with a specific rule?

I have a table containing three columns: data, code, and factor. For each “code“, i.e., A or B, I want to fill every five records with the same factor. Take code A for example, starting from 2021.01.02, I want to fill the next four records with the…
dbaa9948
  • 189
  • 2
  • 10
0
votes
2 answers

MySQL: using char(n) vs decimal(n) with zero fill

I was asked to use a database in which most of the primary keys, and other fields as well, uses char(n) to store numeric values with padding, for example: product_id: char(8) [00005677] user_id: char(6) [000043] category_id: char(2) [05] The reason…
lepe
  • 24,677
  • 9
  • 99
  • 108
0
votes
0 answers

How to set field to zerofill after create table?

I created the table with stud_id int, phone_number int, So after that I want to add some settings like zerofill in phone_number. So how can I set this zerofill? I saw in the internet alter table table_name But there were : 1)change table name, 2)…
bekanur98
  • 502
  • 1
  • 7
  • 20
0
votes
1 answer

How to retrieve zero fill column from mysql via python?

I have a table in mysql as below: CREATE TABLE `province` ( `pid` int(2) unsigned zerofill NOT NULL, `pname` varchar(255) CHARACTER SET utf8 COLLATE utf8_persian_ci DEFAULT NULL, `family` int(12) DEFAULT NULL, `population` int(11) DEFAULT…
mehdi parastar
  • 737
  • 4
  • 13
  • 29
0
votes
1 answer

show year + auto increment as column register

i have column register on table jadwal: CREATE TABLE IF NOT EXISTS 'jadwal' ('register' int(5) zerofill NOT NULL AUTO_INCREMENT, PRIMARY KEY ('register') i want to show register combine, this year + auto_increment…
gun.4
  • 1
  • 3
0
votes
3 answers

class __constructor don't return zerofill number

I have this class : class codici { public $i; public $len; public $str; public $type; function __construct() { $this->getPad($this->i); } public function getPad($i) { return…
0
votes
2 answers

how to represent MySql zerofill in JSON response

Hello everyone I am tring to retrive my Column That have a zerofill specifications with json response but it seems to be that php ignore the zeros in there , so i tried to use str_pad to do the same work as the zerofill but it's ignore it too !!!…
Reem Aziz
  • 1,425
  • 2
  • 17
  • 22
0
votes
2 answers

Why php array not support Zerofill arguments

I have an php array having arguments with Zerofill values like.. $a = (00001, 00008, 00009, 00012); When I am using this array as parameter of a function, then it giving unexpected results, like... print_r($a); //prints array ( [0]=>1 [1]=>0 …
santoshe61
  • 805
  • 8
  • 17
0
votes
3 answers

Why can't I change my INT from unsigned to signed? Is signed Zerofill possible?

I have a field called NUMBER in a table called TEST NUMBER is int(8) Unsigned Zerofill Not Null I need negative numbers in this field now and I'd still like them zerofilled For example -00023419 I can change it to signed, but can't seem to get…
CheeseFlavored
  • 1,922
  • 1
  • 21
  • 28