Jump to content

Help needed in select command using table A and B


ersaurabh101

Recommended Posts

My command is 

$stmt2 = "select rowsno , comid , sno , tag_from FROM tasktag where COMID='$COMID' and  TAG_FROM = '$TAGFROM'";

I want to fetch 1 more value in it but from a different table using the sno from the above select command

 

If wish to fetch LATEST_ACTIVITY_NO from admtask where sno = sno 

 

I want this inside stmt2 command only because its returning an array like this -

[
  {
    "ROWSNO": "2224",
    "COMID": "54578",
    "SNO": "31598",
    "TAG_FROM": "SAURABH"
  }
]

and i wish to include LATEST_ACTIVITY_NO in it

Link to comment
Share on other sites

OMG! All this time I have been slaving away making sure of my case usage and now I find out what you knew all the time.

Don't know what made me think that case mattered....

 

What an idiot I am!

I think it's better to maintain the same case anyway - using Linux a lot means you tend to get used to the fact that case matters in a lot of things (which is why table names can be case sensitive)

 

I'm a fan of camel case and I think it makes things more readable - but inconsistent use of case for the same field can (IMHO) lead to confusion.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.