Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

POnumber is an array. Probably you must do a for/whyle query.

Write: dd($POnumber) and show us

Last updated 2 years ago.
0

It only shows empty array: Array ( )

Last updated 2 years ago.
0

array(0) { }

Last updated 2 years ago.
0

Hi.
POnumber is not an array. It is obviously a string.
When making a query with numbers inside (or other stuff), instead fo the numbers you see only (?). This query with questionmarks is followed by an array. Every element in the array represents the value for a questionmark.
In your case, the array should be array(1){ 0 => "PO/DM/20:0012345"}
You are probably missing s '/' between the time and number.

$POnumber = "PO/DM/" . $time . "/". $number;

To make this more readable, in PHP you can do this

$POnumber = "PO/DM/$time/$number";

$PO contains the result. In your case the resulting empty. No matches found.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.