473,378 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Variable is nor right but how

I am trying to make a change to a php program,
Could you see the error

$t = $_SESSION[f_or_temp_data][f_or_st_id];
$query = "select vinalux.fabric, size.size_height_max, price.size_key
from vinalux join (size, price)
where price.size_key = $t";

I get the error

Could Not Execute SQL statementYou have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
size.size_wi

If I change it to
where price.size_key = '$t' ";
The error stays the same
Could you give me a clou
thanks for your time

Fedor
Oct 27 '06 #1
10 1305
You need an "ON" clause to tell it what to join the table with

SELECT * FROM a JOIN b ON a.postcode = b.postcode WHERE a.name = 'Fred'

fedor wrote:
I am trying to make a change to a php program,
Could you see the error

$t = $_SESSION[f_or_temp_data][f_or_st_id];
$query = "select vinalux.fabric, size.size_height_max, price.size_key
from vinalux join (size, price)
where price.size_key = $t";

I get the error

Could Not Execute SQL statementYou have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
size.size_wi

If I change it to
where price.size_key = '$t' ";
The error stays the same
Could you give me a clou
thanks for your time

Fedor
Oct 27 '06 #2

fedor wrote:
I am trying to make a change to a php program,
Could you see the error

$t = $_SESSION[f_or_temp_data][f_or_st_id];
$query = "select vinalux.fabric, size.size_height_max, price.size_key
from vinalux join (size, price)
where price.size_key = $t";

I get the error

Could Not Execute SQL statementYou have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
size.size_wi

If I change it to
where price.size_key = '$t' ";
The error stays the same
Could you give me a clou
thanks for your time

Fedor
Please don't cross post! You have already had your reply in another
forum

Oct 27 '06 #3
Captain Paralytic wrote:
fedor wrote:
>>I am trying to make a change to a php program,
Could you see the error

$t = $_SESSION[f_or_temp_data][f_or_st_id];
$query = "select vinalux.fabric, size.size_height_max, price.size_key
from vinalux join (size, price)
where price.size_key = $t";

I get the error

Could Not Execute SQL statementYou have an error in your SQL syntax.
Check the manual that corresponds to your MySQL server version for the
right syntax to use near ' price.size_key = f2 order by vinalux.fabric,
size.size_wi

If I change it to
where price.size_key = '$t' ";
The error stays the same
Could you give me a clou
thanks for your time

Fedor

Please don't cross post! You have already had your reply in another
forum
Wrong. Cross-posting is good. Multi-posting is bad.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 28 '06 #4
Rik
Jerry Stuckle wrote:
>Please don't cross post! You have already had your reply in another
forum

Wrong. Cross-posting is good. Multi-posting is bad.
Well, cross-posting is the lesser of the evils, not good. Only when you're
very sure you _need_ more groups.
--
Rik Wasmus
Oct 28 '06 #5
Rik wrote:
Jerry Stuckle wrote:
Please don't cross post! You have already had your reply in another
forum
Wrong. Cross-posting is good. Multi-posting is bad.

Well, cross-posting is the lesser of the evils, not good. Only when you're
very sure you _need_ more groups.
--
Rik Wasmus
I agree. However Jerry was right that I was wrong. I realised that I
had said "cross" instead of "multi" just after I had pressed "Post
message"!

Oct 30 '06 #6
Captain Paralytic wrote:
Rik wrote:
>>Jerry Stuckle wrote:
>>>>Please don't cross post! You have already had your reply in another
forum

Wrong. Cross-posting is good. Multi-posting is bad.

Well, cross-posting is the lesser of the evils, not good. Only when you're
very sure you _need_ more groups.
--
Rik Wasmus


I agree. However Jerry was right that I was wrong. I realised that I
had said "cross" instead of "multi" just after I had pressed "Post
message"!
Don't you just hate when that happens? :-)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 30 '06 #7

Jerry Stuckle wrote:
Captain Paralytic wrote:
Rik wrote:
>Jerry Stuckle wrote:

Please don't cross post! You have already had your reply in another
forum

Wrong. Cross-posting is good. Multi-posting is bad.

Well, cross-posting is the lesser of the evils, not good. Only when you're
very sure you _need_ more groups.
--
Rik Wasmus

I agree. However Jerry was right that I was wrong. I realised that I
had said "cross" instead of "multi" just after I had pressed "Post
message"!

Don't you just hate when that happens? :-)
Yeah, the "Undo" button just doesn't hack it in that situation!

Nov 1 '06 #8

"Captain Paralytic" <pa**********@yahoo.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
>
Jerry Stuckle wrote:
>Captain Paralytic wrote:
Rik wrote:

Jerry Stuckle wrote:

Please don't cross post! You have already had your reply in another
forum

Wrong. Cross-posting is good. Multi-posting is bad.

Well, cross-posting is the lesser of the evils, not good. Only when
you're
very sure you _need_ more groups.
--
Rik Wasmus
I agree. However Jerry was right that I was wrong. I realised that I
had said "cross" instead of "multi" just after I had pressed "Post
message"!

Don't you just hate when that happens? :-)

Yeah, the "Undo" button just doesn't hack it in that situation!
I have found that there are two goups that are virutally identical, this one
and alt.comp.lang.php. I have also found that by multi-posting to the two
groups I have sometimes (seldom) received answers from alt.comp.lang.php
before (or even sometimes only) before getting help from this one.
Therefore, I multi-post to the two.

Now, when two groups are SOOOO close, couldn't something be done to unify
the two so that going to the less popular one (the other one) would
automatically redirect the user to this one?

Shelly
Nov 1 '06 #9
Shelly wrote:
"Captain Paralytic" <pa**********@yahoo.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
>>Jerry Stuckle wrote:
>>>Captain Paralytic wrote:

Rik wrote:
>Jerry Stuckle wrote:
>
>
>>>Please don't cross post! You have already had your reply in another
>>>forum
>>
>>Wrong. Cross-posting is good. Multi-posting is bad.
>
>Well, cross-posting is the lesser of the evils, not good. Only when
>you're
>very sure you _need_ more groups.
>--
>Rik Wasmus
I agree. However Jerry was right that I was wrong. I realised that I
had said "cross" instead of "multi" just after I had pressed "Post
message"!
Don't you just hate when that happens? :-)

Yeah, the "Undo" button just doesn't hack it in that situation!


I have found that there are two goups that are virutally identical, this one
and alt.comp.lang.php. I have also found that by multi-posting to the two
groups I have sometimes (seldom) received answers from alt.comp.lang.php
before (or even sometimes only) before getting help from this one.
Therefore, I multi-post to the two.

Now, when two groups are SOOOO close, couldn't something be done to unify
the two so that going to the less popular one (the other one) would
automatically redirect the user to this one?

Shelly

Nope, usenet doesn't work that way. One group cannot be redirected to
another.

alt.comp.lang.php is the older group, but being an 'alt' group has not
been 'sanctioned' by the PTB. Anyone can create an alt group for any
reason.

comp.lang.php had to go through a longer process - someone had to submit
a proposed charter, there was a period of time for comments, the
proposed charter had to be voted on, and finally the group could be
created. So it is more 'official' in that respect.

But both groups are OK.

And you should not be multi-posting. Rather you should be cross-posting.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Nov 1 '06 #10

"Jerry Stuckle" <js*******@attglobal.netwrote in message
news:eO******************************@comcast.com. ..
But both groups are OK.

And you should not be multi-posting. Rather you should be cross-posting.
I put two addresses in and submit both at the same time.
Nov 2 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: manish | last post by:
I have created a function, it gives more readability compared to the print_r function. As of print_r, it works both for array or single variable. I just want to add in it, the opton to view the...
83
by: Alexander Zatvornitskiy | last post by:
Hello All! I'am novice in python, and I find one very bad thing (from my point of view) in language. There is no keyword or syntax to declare variable, like 'var' in Pascal, or special syntax in...
3
by: Bryan Parkoff | last post by:
.....I try to reduce un-necessary temporal variables so it can be optimized for best performance. I try to assign only one register storage so two variables can access to only one register storage...
7
by: Klaus Johannes Rusch | last post by:
Is the following code valid and supported by current implementations? function somename() { this.show = function () { document.write("somename called") } } var somename = new somename();...
23
by: Russ Chinoy | last post by:
Hi, This may be a totally newbie question, but I'm stumped. If I have a function such as: function DoSomething(strVarName) { ..... }
6
by: Jeremy Felt | last post by:
Newbie here. I'm sure I'm missing something EXTREMELY simple, but an hour of searching has led to nothing. I'm playing around with ajax and trying to pass a variable to a function. If I do:...
2
by: Florian Loitsch | last post by:
hi, What should be the output of the following code-snippet? === var x = "global"; function f() { var x = 0; eval("function x() { return false; }"); delete x; alert(x); }
2
by: Kevin | last post by:
I am having difficulty updating a variable page-time-stamp in the following snippit. The variable time-stamp is initialized from the attribute time-stamp from the log element. Some of the page...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
5
by: Twayne | last post by:
Hi, If ever a newbie wants to know how much he has to learn yet, he only has to look here<g>!! ANYway: PHP 5.2.5; XP Pro SP2+, local Apache Server My actual question is: How do I get a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.