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:

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

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

Business Health Check
Hello

I need to create an online business health check for a client it will be multiple choi

Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the goin

Why does my crawler script suddenly end with no error?
Hi.

I have written a web crawler script. It will visit a large number of URL's with cURL.

Not Inserting into DB
I can't get my Add new Division form to submit to the database. Anyone see my issue?

Code: &a

Any decent php formatter/beautifier/pretty printer?
Any decent php formatter/beautifier/pretty printer class/function?

I found the following whil

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

Developing Ajax-enabled ASP.Net applications for the iPhone
I would like to develop Ajax web applications using Visual Studio that are optimized for the iPhone.

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