473,503 Members | 3,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Code Help needed

RT
Hello;

I'm trying to create a updates pages that I can move either to the previous
record or the next record within a recordset without having to return to the
repeating list of records after each up date.

Assuming I have done the recordset correctly, which I have and the update
records command as well here is the code I'm trying to use:

<?php
$prev = ''; $next = '';
$result = mysql_query("SELECT id FROM affiliates WHERE id <
$row_rsaffiliate[id] ORDER BY id DESC");
if ($result)
{
$row = mysql_fetch_row($result);
$prev = $row[0];
mysql_free_result($result);
}
$result = mysql_query("SELECT id FROM affiliates WHERE id <
$row_rsaffiliate[id] ORDER BY id ASC");
if ($result)
{
$row = mysql_fetch_row($result);
$next = $row[0];
mysql_free_result($result);
}
?>

<?php
if ($prev) echo '<a
href="../affiliateeditform.php?id=' . $prev . '"><b>&lt;&lt;Prev</b></a>';
else echo '<b>&lt;&lt;Prev</b>';
?>
<?php
if ($next) echo '<a
href="../affiliateeditform.php?id=' . $next . '"><b>Next&gt;&gt;</b></a>';
else echo '<b>Next&gt;&gt;</b>';
?>
This code works in another page I copied it from but in the page I paste it
into so that leads me to believe I'm missing something.

In the New page the Prev and Next labels show up as text and not links
between the records as I want.

Any thoughts anyone.

Thanks

RT

Jul 17 '05 #1
0 1106

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

Similar topics

18
18302
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
7
1736
by: Alan Silver | last post by:
Hello, I have installed the 2.0 framework, and am looking at converting some of my 1.1 pages to use partial classes. I don't (yet) have VS2005, so I'm doing this by hand, but am having problems....
52
3157
by: Julie | last post by:
I'm supporting an application at work. Below are some code segments that I can't understand how they work. First let me say, I would never code this standard. I'm just really creeped out that it...
0
1451
by: ultradiv | last post by:
I have a VB.NET application partly built that produces an xml output (just a file at present) I have a .NET webserver and SQLserver 2000 I need to be able to send the xml to the webserver/database...
11
1409
by: Sachin Garg | last post by:
I need to build two executables from my code, one having all the code (and thus application features) and other not having it all. How to best manage the code that shouldn't go in one of the...
0
7291
Oralloy
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,...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5598
agi2029
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,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4690
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...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
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 ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.