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

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

MYSQL INSERT ID NOT WORKING
Code: $id = mysql_insert_id();
header("Location: ./?view=$id");
Why $id pulling blan

php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

Having problemswith multithreading and prime numbers
I have an assignment when I'm suppose to do the following:

Write a multithreaded Java, Pt

Insert to MySQL inside foreach
Hey.
I am parsing some html, and putting inside an html db.
I need to create a randomized inte

import table with dependency
Hi

What is the best way to import table back which has dependency?

SQL> cre

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

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