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

Can we convert non uni code system into unicode
Hi All,

Presently i am using non-unicode system and the sap version is 4.7.
Can i c

Creating a custom API
I'm creating a site, and I need to create a basic API. Unfortunately I have no idea where to start.

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

Delete records not in top 15
Hi,

I'm creating a hall of fame page in my game and the page will only display the top 15 sco

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

Is there a more efficient way to code this than what I have?
I have three associative arrays.

$combinedSettings
$userSettings
$defaultSettings

Keeping track of php uploads
Hello all.

I was looking at the way PHP handles file uploads.
It seems that PHP uses a tem

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

Remove directories not empty
hi,
i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.<

Creation of Raw Exposure manually
SAP Gurus

I am creating Raw Exposure ( Hedge management ) thru T Code TEM10 with followin

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