• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 126
  • Last Modified:

Trying to create a variable's value, but getting error instead...

Hi,
Trying to create a variable value to use further down in my code. I'm not sure how to express this properly. Currently I get an error:
Syntax error, unexpected ','
How do I get around that?
$sortby = DB::raw('used_vehicles.vehicle_price - used_vehicles.discount'), 'ASC';

Open in new window

0
tjyoung
Asked:
tjyoung
  • 2
  • 2
1 Solution
 
Ray PaseurCommented:
Maybe try this... Moved closing parenthesis:
$sortby = DB::raw('used_vehicles.vehicle_price - used_vehicles.discount', 'ASC');

Open in new window

0
 
tjyoungAuthor Commented:
Geez I suck lol
Thanks again Ray :)
0
 
Ray PaseurCommented:
J' Welcome!  I have those moments, too, when I look at something and just can't see it.  Glad to help out :-)
0
 
tjyoungAuthor Commented:
Issue is fixed. Thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now