473,657 Members | 2,266 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("SE LECT id FROM affiliates WHERE id <
$row_rsaffiliat e[id] ORDER BY id DESC");
if ($result)
{
$row = mysql_fetch_row ($result);
$prev = $row[0];
mysql_free_resu lt($result);
}
$result = mysql_query("SE LECT id FROM affiliates WHERE id <
$row_rsaffiliat e[id] ORDER BY id ASC");
if ($result)
{
$row = mysql_fetch_row ($result);
$next = $row[0];
mysql_free_resu lt($result);
}
?>

<?php
if ($prev) echo '<a
href="../affiliateeditfo rm.php?id=' . $prev . '"><b>&lt;&lt;P rev</b></a>';
else echo '<b>&lt;&lt;Pre v</b>';
?>
<?php
if ($next) echo '<a
href="../affiliateeditfo rm.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 1122

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

Similar topics

18
18359
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 a remote update of tables and fields and can't find enough information on these things. Also, how do you index a field in code?
7
1745
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. I have a simple page that I made in the beta2 version of VWD. The code behind looks like... using System;
52
3200
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 works. Here's the setup. I have a function, called GetEmployeeCertifications, that is going to make a call to a SQL DB and return a result set. This module calls another function, called FillParameters, to determine if SQL parameters need to...
0
1476
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 (some crunching is needed before the data is stored) The database (stored proc.) will reply with several small pieces of data which need to be sent back to the client app. I am thinking that all of this could be accomplished in one call to a...
11
1423
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 executables? My first thought is to use conditional compilation with #define and #ifdef etc but its getting messy, are there better ways to manage this? The problem in detail: #. There is a class A with virtual foo1 and foo2
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
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, 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...
1
8512
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,...
0
8612
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6175
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
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
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.