12 Replies - 601 Views - Last Post: 24 April 2018 - 07:50 AM Rate Topic: -----

#1 gussy81   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 175
  • Joined: 24-February 15

SQL Query

Posted 24 April 2018 - 12:59 AM

Hi,

trying to re-write our secure log in. trying to replicate a part of it.

so basically it runs a select and sends the results to a table. one of the results is the users reference number but this shows up as a link which itself runs a select when clicked - hope i am making sense.

is there a name for this that i can research and figure out?

thanks in advance
G
Is This A Good Question/Topic? 0
  • +

Replies To: SQL Query

#2 andrewsw   User is online

  • dependency injected
  • member icon

Reputation: 6668
  • View blog
  • Posts: 27,308
  • Joined: 12-December 12

Re: SQL Query

Posted 24 April 2018 - 04:26 AM

This needs a clearer description in my opinion. For example, shows up where as a link?
Was This Post Helpful? 0
  • +
  • -

#3 gussy81   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: SQL Query

Posted 24 April 2018 - 05:08 AM

my opologies.

ok so there is a SELECT done on a table (id number, name, surname, address, book-title, price)

then when all of these are displayed in the table the id nunmber is a clickable hyperlink. when its clicked it navigates to another page and runs another select based on this id number.

I hope this is a bit clearer

thanks
G
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: SQL Query

Posted 24 April 2018 - 07:09 AM

What does the 'secure login' have to do with a link from an ID? I am missing that connection.
Was This Post Helpful? 0
  • +
  • -

#5 gussy81   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: SQL Query

Posted 24 April 2018 - 07:20 AM

i suppose the secure login element is irrelevant
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: SQL Query

Posted 24 April 2018 - 07:23 AM

Ooookay.. so then is the issue you want some other page to show up information based on this ID/hyperlink you have?

Like a CMS? Where a page, given a URL parameter, loads information up? Similar to the profile page here? Given a user id a single php page can display profile info..
Was This Post Helpful? 0
  • +
  • -

#7 gussy81   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: SQL Query

Posted 24 April 2018 - 07:27 AM

Really all i want to do is make the ID_number from the SQL table tp appear as a hyper link.
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: SQL Query

Posted 24 April 2018 - 07:33 AM

Oh geeze.. The way you wrote it sounded you were already doing it.

Okay.. so how are you displaying your table information from the database?

What version of ASP.NET is this?

Should be fairly trivial string concatenation... be it in the form or heck you can do it in the SQL call.. (though I would recommend it).
Was This Post Helpful? 0
  • +
  • -

#9 gussy81   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: SQL Query

Posted 24 April 2018 - 07:39 AM

OK so using v4.5

so i run a select on a table based on the id number in-putted into a text field.

this is them displayed in a ASP gridview
Was This Post Helpful? 0
  • +
  • -

#10 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: SQL Query

Posted 24 April 2018 - 07:43 AM

Okay.. so.. make the "a href" around it. Again should be pretty easy peasy string concatenation.
Was This Post Helpful? 0
  • +
  • -

#11 gussy81   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: SQL Query

Posted 24 April 2018 - 07:45 AM

ok and to take that a step further would it be possible to query the table again from this hyperlink? (i want the user to open up a more detailed profile view)
Was This Post Helpful? 0
  • +
  • -

#12 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,719
  • Joined: 12-June 08

Re: SQL Query

Posted 24 April 2018 - 07:49 AM

Certainly. Any given page can read URL parameters.

Example:
https://msdn.microso...y/6c3yckfw.aspx

.. or session values.. or cookies.. etc.
Was This Post Helpful? 0
  • +
  • -

#13 gussy81   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 175
  • Joined: 24-February 15

Re: SQL Query

Posted 24 April 2018 - 07:50 AM

thank you very much
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1