Questions tagged [mysql-error-1048]
7 questions
2
votes
1 answer
Integrity constraint violation: 1048 DOCTRINE
I'm doing a ManyToMany Unidirectional relation from Orders to Products that one order can have many products and one product can be in many orders.
See my code:
/**
* @ManyToMany(targetEntity="Product")
* @JoinTable(name="dc_order_products",
* …

Diego Schell Fernandes
- 259
- 4
- 16
1
vote
2 answers
Error Number: 1048 , Even though the input form has been filled correctly
I have an issue with the input in my CodeIgniter. Even though the input form has been filled correctly, Error Number: 1048 still appears. Please help with a solution for this error.
Here is the code for my view, 'entry.php':

Ahmad Romadhon
- 21
- 2
1
vote
1 answer
Laravel: Integrity constraint violation: 1048 because $request-all() strips empty strings
I have a model with a number of fillable fields
class Customer extends Model
{
protected $fillable = [...,'my_field'...]
}
I also have a controller to update this table with the following method:
public function update(Request $request, Customer…

NDDT
- 445
- 1
- 10
- 27
1
vote
1 answer
Integrity constraint violation: 1048 Column 'url_id' cannot be null
I am getting this error in Zend Framework:
Integrity constraint violation: 1048 Column 'url_id' cannot be null
My code is:
$stmt = $this->select()->where('url_address = ?', $url_address)->query();
$r = $stmt->fetchAll(); …

Future King
- 3,819
- 6
- 28
- 37
0
votes
0 answers
MYSQL Error 1048, why cannot ID be null and use auto increment?
Example questions I am following, created tables this way and was able to insert value for ID as null, since it is auto increment, I thought it would do the math itself? Am I misunderstanding the auto increment feature? How come this doesn't work?…

gingeryaz1402
- 1
- 2
0
votes
3 answers
problem Integrity constraint violation: 1048 Column
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'patente' cannot be null (SQL: insert into cars (patente, marca, modelo, color, fecha_ingreso, updated_at, created_at) values (?, ?, ?, ?, ?, 2019-06-10 16:27:35, 2019-06-10…

Francisco González Mejías
- 147
- 1
- 12
0
votes
3 answers
Integrity constraint violation: 1048 Column
enter image description here
enter image description here
Hello I have an error in my database. the user registers in the users table and now he has to post an ad. I'm trying to get his id in the ads table.
But it returns me this error:
SQLSTATE…

Kouassi DJE
- 21
- 8