Posts by Joao Marcos • 21 points
4 posts
-
0
votes1
answer20
viewsA: I’m trying to make a select here more ta giving this problem Trying to get Property 'num_rows' of non-object on line 49
private static function getFilters($where) { $sql = ''; if(count($where) > 0) { $sql .= " WHERE 1 = 1"; foreach($where as $column => $value) { if($column ==…
-
0
votes1
answer20
viewsQ: I’m trying to make a select here more ta giving this problem Trying to get Property 'num_rows' of non-object on line 49
// essa função vai retornar um select de um determinado modelo public static function getResultSetFromSelect($where = [], $colunas = '*') { $sql = "SELECT ${colunas} FROM " …
-
0
votes1
answer34
viewsQ: I’m new in php and I’m confusing a lot what is the difference of this sign => for this ->
public function cadastro(Request $request) { $user=new User(); $user->name= $request->name; $user->email=$request->email; $user->password=…
phpasked Joao Marcos 21 -
-3
votes1
answer59
viewsQ: I am trying to sum two numbers and save the result in the bank with Variable plus this giving error Undefined offset
public function somar(Request $req){ $dados= $req->all(); $n1=$_POST['n1']; $n2=$_POST['n2']; $resultado=$n1+$n2; Calculo::create([ 'resultado'=>…