Home ยป Php ยป Variable is nor right but how – PHP

Variable is nor right but how – PHP

Posted by: admin February 23, 2020 Leave a comment

Q(Question):

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

A(Answer):

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

A(Answer):

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

A(Answer):

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
==================

A(Answer):

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

A(Answer):

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"!

A(Answer):

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
==================

A(Answer):

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!

A(Answer):

"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

A(Answer):

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
==================

A(Answer):

"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.