I'm having a MySQl table wih a lot of information. I want to present some
main fields in a table on one page. Each record do, of course, have a unique
ID. The presnted table will have one field as a linked field. I want to be
able to click this link, retreive the ID information for that record and
then present detailed data for that record on the next page.
How do I retreive the ID?
Any hints are very much appreciated.
Thanks 12 1762
Lennart Anderson wrote:
I'm having a MySQl table wih a lot of information. I want to present some
main fields in a table on one page. Each record do, of course, have a unique
ID. The presnted table will have one field as a linked field. I want to be
able to click this link, retreive the ID information for that record and
then present detailed data for that record on the next page.
How do I retreive the ID?
Any hints are very much appreciated.
Thanks
Put the id in the link itself.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet
news:xt******** *************** *******@comcast .com...
Lennart Anderson wrote:
>I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as a linked field. I want to be able to click this link, retreive the ID information for that record and then present detailed data for that record on the next page. How do I retreive the ID? Any hints are very much appreciated. Thanks
Put the id in the link itself.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
I think I get the idea but I don't know how to doo that. Can you give me an
aidea of how such a link with, I guess, embedded ID would look like?
"Lennart Anderson" <le************ **@tele2.seskre v i meddelandet
news:n%******** *******@nntpser ver.swip.net...
>
"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet
news:xt******** *************** *******@comcast .com...
>Lennart Anderson wrote:
>>I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as a linked field. I want to be able to click this link, retreive the ID information for that record and then present detailed data for that record on the next page. How do I retreive the ID? Any hints are very much appreciated. Thanks
Put the id in the link itself.
-- ============== ==== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============== ====
I think I get the idea but I don't know how to doo that. Can you give me
an aidea of how such a link with, I guess, embedded ID would look like?
Furthermore, if I click a link on a displayed record I can only get
information from the link of the last displayed record. How to get
information of the ID from any of the earlier displayed records?
Lennart Anderson wrote:
"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet
news:xt******** *************** *******@comcast .com...
>Lennart Anderson wrote:
>>I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as a linked field. I want to be able to click this link, retreive the ID information for that record and then present detailed data for that record on the next page. How do I retreive the ID? Any hints are very much appreciated. Thanks
Put the id in the link itself.
-- ============== ==== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============== ====
I think I get the idea but I don't know how to doo that. Can you give me an
aidea of how such a link with, I guess, embedded ID would look like?
Do you know how to do it in html? Same idea - just generated with a PHP
echo statement instead.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
Lennart Anderson wrote:
"Lennart Anderson" <le************ **@tele2.seskre v i meddelandet
news:n%******** *******@nntpser ver.swip.net...
>"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet news:xt******* *************** ********@comcas t.com...
>>Lennart Anderson wrote: I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as a linked field. I want to be able to click this link, retreive the ID information for that record and then present detailed data for that record on the next page. How do I retreive the ID? Any hints are very much appreciated. Thanks Put the id in the link itself.
-- ============= ===== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============= =====
I think I get the idea but I don't know how to doo that. Can you give me an aidea of how such a link with, I guess, embedded ID would look like?
Furthermore, if I click a link on a displayed record I can only get
information from the link of the last displayed record. How to get
information of the ID from any of the earlier displayed records?
If you want to get information from previously displayed records you're
going to have to save them and pass them along somehow - i.e in a
session or hidden fields in your form.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet
news:yb******** *************** *******@comcast .com...
Lennart Anderson wrote:
>"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet news:xt******* *************** ********@comcas t.com...
>>Lennart Anderson wrote: I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as a linked field. I want to be able to click this link, retreive the ID informatio n for that record and then present detailed data for that record on the next page. How do I retreive the ID? Any hints are very much appreciated. Thanks Put the id in the link itself.
-- ============= ===== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============= =====
I think I get the idea but I don't know how to doo that. Can you give me an aidea of how such a link with, I guess, embedded ID would look like?
Do you know how to do it in html? Same idea - just generated with a PHP
echo statement instead.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
No, I do not know how to do that in HTML.
But, once again, the problem is that I have a number of records presented in
a table. All records do have unique ID. When preseneted by the hTML page
they are parsed into "hard-coded" HTML and although I can have a field to
act as a link I can't get the ID for the special record I am selecting. Only
the ID for the last presented record will come through since that ID is
still present in the array. Any hint of how to get the ID from any selected
record?
Lennart Anderson wrote:
"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet
news:yb******** *************** *******@comcast .com...
>Lennart Anderson wrote:
>>"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet news:xt****** *************** *********@comca st.com... Lennart Anderson wrote: I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as a linked field. I want to be able to click this link, retreive the ID informati on for that record and then present detailed data for that record on the next page. How do I retreive the ID? Any hints are very much appreciated. Thanks Put the id in the link itself.
-- ============ ====== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============ ====== I think I get the idea but I don't know how to doo that. Can you give me an aidea of how such a link with, I guess, embedded ID would look like?
Do you know how to do it in html? Same idea - just generated with a PHP echo statement instead.
-- ============== ==== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============== ====
No, I do not know how to do that in HTML.
But, once again, the problem is that I have a number of records presented in
a table. All records do have unique ID. When preseneted by the hTML page
they are parsed into "hard-coded" HTML and although I can have a field to
act as a link I can't get the ID for the special record I am selecting. Only
the ID for the last presented record will come through since that ID is
still present in the array. Any hint of how to get the ID from any selected
record?
OK, posting the code you're using would help a lot.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet
news:0o******** *************** *******@comcast .com...
Lennart Anderson wrote:
>"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet news:yb******* *************** ********@comcas t.com...
>>Lennart Anderson wrote: "Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet news:xt***** *************** **********@comc ast.com... Lennart Anderson wrote: >I'm having a MySQl table wih a lot of information. I want to present >some main fields in a table on one page. Each record do, of course, >have a unique ID. The presnted table will have one field as a linked >field. I want to be able to click this link, retreive the ID >informatio n for that record and then present detailed data for that >record on the next page. >How do I retreive the ID? >Any hints are very much appreciated. >Thanks Put the id in the link itself. > -- =========== ======= Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net =========== ======= I think I get the idea but I don't know how to doo that. Can you give me an aidea of how such a link with, I guess, embedded ID would look like? Do you know how to do it in html? Same idea - just generated with a PHP echo statement instead.
-- ============= ===== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============= =====
No, I do not know how to do that in HTML. But, once again, the problem is that I have a number of records presented in a table. All records do have unique ID. When preseneted by the hTML page they are parsed into "hard-coded" HTML and although I can have a field to act as a link I can't get the ID for the special record I am selecting. Only the ID for the last presented record will come through since that ID is still present in the array. Any hint of how to get the ID from any selected record?
OK, posting the code you're using would help a lot.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
Here is the essential part of the code with the presneted table where one of
the records field will be a link. I want to retreive the ID for any selefted
record from, say, 25 presented.
mysql_select_db ('db2') or die ('Unable to select database!');
// create and execute query
$query = "SELECT ID, DATE_FORMAT(add ate, '%m-%d') AS adday,
DATE_FORMAT(add ate, '%H:%i')as adtime, addate, adnamn, adcat,
adheader,adtext ,adprice,adcats .catname FROM ads, adcats where ads.adcat =
adcats.catid order by ID DESC";
$result = mysql_query($qu ery)
or die ('Error in query: $query. ' . mysql_error());
// check if records were returned
if (mysql_num_rows ($result) 0)
{
// iterate over record set
// print each field
echo '<h2>Test on data retrieval from the data base</h2></br>';
echo '<table border=0 cellpadding=2 width = 100% bgcolor="#FFFF9 9"
bordercolor="#F FFFFF">';
echo '<tr>
<td>Ad-No.</td>
<td>Day</td>
<td>Time</td>
<td>Ad-header</td>
<td>Price CI$</td>
<td>Category</td>
</tr>';
while($row = mysql_fetch_obj ect($result))
{
echo '<tr>';
echo '<td width=5% bgcolor="#FFFFF F" align = "right">' . ($row->ID) .
'</td>';
echo '<td width=4% bgcolor="#FFFFF F">' . ($row->adday) . '</td>';
echo '<td width=5% bgcolor="#FFFFF F">' . ($row->adtime) . '</td>';
echo '<td width=40% bgcolor="#FFFFF F">' . '<a href= "advertinfo.php " >' .
($row->adheader) . '</td>';
echo '<td width = 6% bgcolor="#FFFFF F" align = "right">' . ($row->adprice) .
'</td>';
echo '<td width = 18% bgcolor="#FFFFF F">' . ($row->catname) . '</td>';
echo '</tr>';
}
echo '</table>';
}
else
{
// print error message
echo 'No rows found!';
}
Lennart Anderson wrote:
"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet
news:0o******** *************** *******@comcast .com...
>Lennart Anderson wrote:
>>"Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet news:yb****** *************** *********@comca st.com... Lennart Anderson wrote: "Jerry Stuckle" <js*******@attg lobal.netskrev i meddelandet news:xt**** *************** ***********@com cast.com... >Lennart Anderson wrote: >>I'm having a MySQl table wih a lot of information. I want to present >>some main fields in a table on one page. Each record do, of course, >>have a unique ID. The presnted table will have one field as a linked >>field. I want to be able to click this link, retreive the ID >>informati on for that record and then present detailed data for that >>record on the next page. >>How do I retreive the ID? >>Any hints are very much appreciated. >>Thanks >Put the id in the link itself. >> >-- >========== ======== >Remove the "x" from my email address >Jerry Stuckle >JDS Computer Training Corp. >js*******@attgl obal.net >========== ======== I think I get the idea but I don't know how to doo that. Can you give me an aidea of how such a link with, I guess, embedded ID would look like? Do you know how to do it in html? Same idea - just generated with a PHP echo statement instead.
-- ============ ====== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============ ====== No, I do not know how to do that in HTML. But, once again, the problem is that I have a number of records presented in a table. All records do have unique ID. When preseneted by the hTML page they are parsed into "hard-coded" HTML and although I can have a field to act as a link I can't get the ID for the special record I am selecting. Only the ID for the last presented record will come through since that ID is still present in the array. Any hint of how to get the ID from any selected record?
OK, posting the code you're using would help a lot.
-- ============== ==== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. js*******@attgl obal.net ============== ====
Here is the essential part of the code with the presneted table where one of
the records field will be a link. I want to retreive the ID for any selefted
record from, say, 25 presented.
mysql_select_db ('db2') or die ('Unable to select database!');
// create and execute query
$query = "SELECT ID, DATE_FORMAT(add ate, '%m-%d') AS adday,
DATE_FORMAT(add ate, '%H:%i')as adtime, addate, adnamn, adcat,
adheader,adtext ,adprice,adcats .catname FROM ads, adcats where ads.adcat =
adcats.catid order by ID DESC";
$result = mysql_query($qu ery)
or die ('Error in query: $query. ' . mysql_error());
// check if records were returned
if (mysql_num_rows ($result) 0)
{
// iterate over record set
// print each field
echo '<h2>Test on data retrieval from the data base</h2></br>';
echo '<table border=0 cellpadding=2 width = 100% bgcolor="#FFFF9 9"
bordercolor="#F FFFFF">';
echo '<tr>
<td>Ad-No.</td>
<td>Day</td>
<td>Time</td>
<td>Ad-header</td>
<td>Price CI$</td>
<td>Category</td>
</tr>';
while($row = mysql_fetch_obj ect($result))
{
echo '<tr>';
echo '<td width=5% bgcolor="#FFFFF F" align = "right">' . ($row->ID) .
'</td>';
echo '<td width=4% bgcolor="#FFFFF F">' . ($row->adday) . '</td>';
echo '<td width=5% bgcolor="#FFFFF F">' . ($row->adtime) . '</td>';
echo '<td width=40% bgcolor="#FFFFF F">' . '<a href= "advertinfo.php " >' .
($row->adheader) . '</td>';
echo '<td width = 6% bgcolor="#FFFFF F" align = "right">' . ($row->adprice) .
'</td>';
echo '<td width = 18% bgcolor="#FFFFF F">' . ($row->catname) . '</td>';
echo '</tr>';
}
echo '</table>';
}
else
{
// print error message
echo 'No rows found!';
}
OK, if you're going to make it a link, you have to pass the id as a
parameter in the link, i.e.
echo '<td width=40% bgcolor="#FFFFF F">' . '<a href= "advertinfo.php ?id='
.. $row['id'] . " >' . ($row->adheader) . '</td>';
This will pass the link as "advertinfo.php ?id=3", for example.
Then in advertinfo.php you use access it with $_GET['id'].
Be sure to use isset($_GET['id']) in case someone comes to this page
without an id being passed.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== === This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mike420 |
last post by:
In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.
a. orbitz.com web site uses Lisp for algorithms, etc.
b. Yahoo store was originally written in Lisp.
c. Emacs
The issues with these will probably come up, so I might as well
mention them myself (which will also make this a more balanced
|
by: Mary Catherine |
last post by:
I have 2 scipts that I am trying to get to run on the same page. One
is a time/date script, the other is a countdown script (i.e. countdown
days, hours, mins until a given date). They both work independent of
each other, however, when both are on the page, the "active clock"
does not work. I am assuming it is because some of the variables are
the same???
Can anyone help please?!?!
Here are the 2 scripts:
**Active Clock that displays...
|
by: Bibby |
last post by:
Hi, I'm interested in getting started in the programming world. I've dabbled
in C, C++ and VB6. Which would be the best language to focus my attention to
regarding the following considerations:
Hireability
Portability
Flexibility
The likely candidates seem to be Java, VB.Net, C, C++, C#.
|
by: ano |
last post by:
I have a console application and a lot of Console.WriteLine().
Now I want to convert it to Windows Form Application.
Is it possible to getting all of the console messages to Form.Textbox
without changing every Console.WriteLine()?
Thank you in advance.
ano
|
by: sgottenyc |
last post by:
Hello,
If you could assist me with the following situation, I would be very
grateful.
I have a table of data retrieved from database displayed on screen.
To each row of data, I have added action buttons, such as "Edit",
"Add", and "Comment". Since I do not know how many rows of data will
be retrieved - and therefore how many buttons I need - I am using
button arrays for each button, like so:
echo "<input type=\"submit\"...
| |
by: ced69 |
last post by:
having trouble getting marquee to work get object required errors
tring t <title>This Month at the Chamberlain Civic Center</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<script src="Dunbarlab9.js" type="text/javascript"></script>
<script type="text/javascript">
|
by: Bernie |
last post by:
Hello all,
I am new to the group and new to javascripting, so I am hoping to find
some good help here.
Here is a snippet of my code:
HTML:
Name: <input type="text" name="ageName0" id="ageName0" />
<input type="radio" value="0" name="age0" onclick="getPrice();" /6
|
by: Quizzed |
last post by:
Hi,
New user here and using a ms access 97 database.
I have a form containing a list box which presents the contents of a table.
On double clicking a record, i need the record to be presented in a new form where further data can be added.
I set the event procedure against the list box on Double Click, i can then use the DoCmd.OpenForm "frmDataEntry" but how do i pass the value that ive selected (double clicked), to then populate the...
|
by: Innocent2104 |
last post by:
Hi there,
The script below displays the attached output but as shown, it skips certain days and i need to include these to calculate my avg balance for a certain month, i.e.Nov. How do i update the script to include for example between 01 Nov and 05 Nov, there was no entries, therefore my balance should remain the same & display my missing dates 02,03,04 Nov??
DECLARE
@STARTDATE DATETIME,
@ENDDATE DATETIME
SET @STARTDATE = '2009-11-01' ...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |