Join Query Help


Posted on 16th Feb 2014 07:03 pm by admin

Hi all,

I am having problems with the below code, which we shall call 'my first join query'! Suprise suprise its not working and I am getting an error I have not seen before:

Did you know?Explore Trending and Topic pages for more stories like this.
QuoteParse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:wampwwwstockluckpagesstockpage.php
The code is:

Code: [Select]$querybuy=" SELECT users_stocks.bank, stocks.t_val
FROM users_stocks, stocks
WHERE user_id = ' . $_SESSION['user_id'] .'
AND stock_id = '$stock_id'";

$result = mysql_query($querybuy) or die(mysql_error());
and the parse error is referring to this line:
QuoteWHERE user_id = ' . $_SESSION['user_id'] .'
What I am doing wrong?
No comments posted yet

Your Answer:

Login to answer
202 Like 23 Dislike
Previous forums Next forums
Other forums

All possible combinations of String in PL/SQL
Hi All,

Could you please explain the logic of getting all possible combinations of String

A problem with my GD class
Hello,

I created a nice (and simple for now) GD class.
The problem is , it works great on

Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
In the html page one text box

Undefined variables
hi
----------------------------------------------------------------------------------------------

Checking if variable is 0 as opposed to NULL/Empty...
I'm trying to write some code that will retrieve a user's access level from my database and if it do

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

How do i use vars in an array
Hiya peeps!

How do I use a var in an array. You will see $id but it isnt working.


PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

(sub)screen resize modification doesn't work after ECC 6 EhP 4 installation
Hello,

We have previously extended the size of the custom data tab on PO transaction ME23

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash