Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fatal error: Unsupported operand types in ..?

Tags:

php

mysql

message

The line where this error was called from is this:

$celkova_suma=mysql_result($c_res, 0, 0)+mysql_result($d_res, 0, 0)-$zlava_suma+$arr[$_POST['sp_platby']];

Can someone tell me what I should be looking for??

like image 815
Skuta Avatar asked Nov 12 '08 20:11

Skuta


People also ask

How do you fix an unsupported operand type?

The Python "TypeError: unsupported operand type(s) for /: 'str' and 'int'" occurs when we try to use the division / operator with a string and a number. To solve the error, convert the string to an int or a float , e.g. int(my_str) / my_num .

Is not a supported operation for types INT and STR?

The “TypeError: unsupported operand type(s) for -: 'str' and 'int'” error is raised when you try to subtract a string from an integer. You solve this error by converting all strings to integers using the int() method before performing a mathematical operation.


1 Answers

Use `var_dump() on each of the parts of your equation and you'll probably find out that one of them is an array or an object, not a string or integer.

like image 155
Greg Avatar answered Sep 23 '22 09:09

Greg