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

Is there a quick way to do this?
Hi all,

I need to create a mysql table from php that goes a little something like this

Open link with largest int string first
I have the following links i would like to open either all at once or one-by-one. How would i procee

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

Get last modified date of web page
Hai All,

In php how can i get last modified date of a give web page . I have tried to g

Need help in Generating Combinations
Need help generating all possible combination of names in an array

Lets say i have the follow

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

Getting a variable to work in function params
I have this fuction which is inside a class:

Code: public static function generateEmbedCode($

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