skip to Main Content

Python insert intoMySQL

I cannot see why my defined function does not work. No error message, just no INSERT into the Table I define my function: import mysql.connector db = mysql.connector.connect(host="localhost", user="root", passwd="", database="autot") mycursor = db.cursor() def writedb(Tablename,Time, trade_ID, Price, Quantity): mycursor.execute("INSERT…

VIEW QUESTION

Cant return $couponDetails->couponName; value in laravel

$couponCode = $request->couponCode; // Get coupon details by coupon code $coupon = Coupon::where('couponCode', $couponCode) ->get() ->first(); $couponDetails = response()->json($coupon); return $couponDetails->couponName; That returns as: Undefined property: IlluminateHttpJsonResponse::$couponName (500 Internal Server Error) I am tring to get couponName value from couponDetails

VIEW QUESTION
Back To Top
Search