Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Pagination :: Unable To Jump To Row 0


I am running a script to find the "Previous" and "Next" records, the problem is when I get to record 1 I get the error below, same with when I reach the last record in the db.
PHP Code:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 18

Here is the script running it, do I need to add to the query? or how can I use IF/ELSE?PHP Code:

<?php
$id = $_GET['id'];
// Retrieve your record according to id
// Display Record
// Links to Previous Records
$query = "SELECT id FROM jokes WHERE category = '$category' AND id < $id ORDER BY id DESC LIMIT 1" ; // For Previous
$result = mysql_query($query) ;
..........




View Complete Forum Thread with Replies

Related Forum Messages:
Unable To Jump To Row
I have a tariff which is atm 44 rows with 15 columns of numbers. Now i am trying to pull as individual price from the tariff based on user input: Code:

View Replies !
Unable To Jump Row 0
I am getting the following error:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 2 in /home/content/i/n/n/**/html/tracker/connect.php on line 35

Here is my coding from line 34 on down. Code:

View Replies !
Unable To Jump To Row 0 On MySQL Result
im making a login program, and i get this error.

"Warning: Unable to jump to row 0 on MySQL result index 2 in /var/www/html/login.php on line 16"

Code:

View Replies !
Warning: Mysql_result() [function.mysql-result]: Unable To Jump To Row 0
i want to grab the value of a sql entry. but the thing is, sometimes this value is <NULL>. i thought, no biggy, i'll just have an if statement:

if (is_numeric(mysql_result($query, 0))) {
//do something
} else {
//do something else using mysql_result($category_id_query, 0);
}

however, this doe not work. i get this error: Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 is there a way to check to see if mysql_result() is <NULL> without throwing an error.

View Replies !
Warning: Mysql_result(): Unable To Jump To Row 0 On MySQL Result Index
i got this message:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 6 in c:inetpubwwwrootDreamWeaverSiteswebadminwa.php on line 2296

for these lines of code:

$sql11="delete from Booking where Booking_Id='$Booking_Id'";
$result11=mysql_query($sql11);.

View Replies !
Pagination Unable To Navigate
i am trying to use a pagination script that is from a tutorial on here i was given a link to and basically i can get information to display on first page and it brings up standard text saying under PREV5 1 NEXT 5 but it isnt a link or interactive so i cant get next 5 records or last so i have 5 records on screen but cant navigate between them.

But i cant see why the screen shows only 5 records there are no error codes can anyone see what i have done wrong please as i feel like im going round in a circle. Code:

View Replies !
Using Jump Menu
I am using a jump menu to select multiple drop down boxes in a form which are related to the choice you make in the first drop down box.  The problem is that the page reloads and everything before this tag is cleared.  I want to be able to repost the data.  I know that I need to use sessions in my code but I dont know exactly how to use them for this case. Code:

View Replies !
Jump Frame?
I want to make a jump frame (i think is the name), when people click in an image or video, appears a frame in the top (or left), but i want to put an id for each video and image.

There are a simple and better way, but i don´t know how to do, where we can put only the link and it redirects with the frame in php (out.php) like this one (this is an adult link, not spam, only is an example what i want): Code:

View Replies !
JUMP Out Of The Script
"mysql_connect establishes a connection for the duration of the script that access the db. Once the script has finished executing it closes the connection. The only time you need to close the connection manually is if you jump out of the script for any reason. "

http://www.webmasterworld.com/forum88/903.htm

What does he mean by jump out? I used header redirection, is this "jump out", but after header redirection, I always added exit;, does it mean that I need to close the connection.

View Replies !
Jump Menu
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="www.site1.com">google</option>
<option value="www.site2.com">metu</option>
<option value="www.site3.com">mynet</option>
<option value="www.site4.com">asa</option>
</select>

above code ; i want to get the selected value and post as named $url into a php code.
How can i call the selected value?

View Replies !
Site Jump During Submission
1)I'am collecting form data on my server from a HTML form.

The next steps Iam trying to figure out is:

2) I want to then go to another site (payment site)

3) then back to my site.

4) extract original data gathered from step 1

I know the simple method would be to go to pay site first then to my site. However I would like my form first! I also do not want to write the data into mysql in step 1. Not until step 4.

View Replies !
Jump From One Part Of The Script To Another
Is it possible to jump from one part of the script to another part? Meaning the script would jump from line 7 to line 20, ignoring lines 8-19.

View Replies !
Header('Location:') Jump Ignored?
I'm seeing a problem that has me flummoxed. The only thing I can
think of is that I'm violating some rule I don't know about.

I have some code that does some processing and then does a
header('Location: ...) jump to page A on success or falls through to
the jump to page B. This is the code:

if ( mysql_query( 'LOCK TABLES tableX WRITE', $link ) )
{
mysql_query( $q, $link ) ; // store the record
$ID = mysql_insert_id( $link ) ; // save the new id

if ( mysql_affected_rows($link) == 1 )
{
unlock_tables() ;
$_SESSION['ErrMsg'] = 'New ID is ' . $ID ;
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' Error: ignored jump' ;
}
else // the store failed
{ error handling }
}
// second chance (for debugging) to do the right thing
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' and it ignored it AGAIN!' ;

// and we shouldn't get here at all -- but we do!
header( 'Location: PageB.php ) ;


Unfortunately, as I know from the telltales I stuff into session, the
store works but the interpreter ignores both header calls that would
jump to A and finally jumps to B instead. Unless I'm more tired than
I'm aware, or more ignorant, this doesn't make sense.

View Replies !
Jump To Section Of Same Page
PHP Group,

How can I in PHP, based on a result, move the cursor to a certain location
on the page? I want the same result as Anchor tags in HTML. I want to go to
a certain section of the same page based on a return result in PHP. What
this is for is an order forms page - when a user fills out a section
incorrectly, I want the page to display at that location in the form after
the user presses a submit button.



View Replies !
Jump Out Of A Multidimensional Array?
trying to get out of an array dynamically.

$transport = array('foot', 'bike', 'car', array('test1', 'test2'));
i'm in test2( $transport[3][1] ), how do I go into $transport[3]? Is there a function capable of doing this?

View Replies !
Jump Menu Selected Value
I have a set of 2 menus where the values of the 2nd are dependent on the value selected in the first. Yes, I will (eventually) convert this to a javascript process, but for now I am content reloading the page.

I have created a jumpmenu that reloads the page with the state passed in the url (ie. community.php?state=NY). This determines the values displayed in a second (dependent) menu which then lists the counties available for that state. Code:

View Replies !
Jump To Html Page
I am a php newbe and I am trying to figure out how to simply display an existing html page from my php script. Here is the code I use but I get the normal "output started" errors.

$sql = "INSERT INTO author SET
firstname='$name1',
lastname='$name2',
workphone='$workphone',
email='$email',
loginid='$loginid',
password='$password'";
if (@mysql_query($sql)) {
header("Location: formSubmit.htm"); <--------HERE

View Replies !
Dynamic Jump Menu
I'm looking to create a dynamic jump menu/list menu that will enable me to navigate to a particular record by selecting a value from the list, however the list is dynamically generated from the recordset. Code:

View Replies !
Header - Jump Menu Does Nothing In IE
I have a php header and php footer that are being called into my content pages. In the php header, I have a jump to menu system. The jump to menu works great in Firefox, however, the jump menu does nothing in IE. Have any of you experienced problems with jump to menues in php headers and whatnot?

View Replies !
PHP/MySql Jump Script
I have also read in a affiliate forum (quote below)that putting &afsrc=1 at the end of a link will help click through, how might this also be implemented? "Recently, I put the &afsrc=1 on all my links across my largest sites. Damned if sales have not increased by 10-20% since then. (it has been about 2 weeks at about 13000 clicks a day)"

<?php
$link = mysql_connect ("localhost", "user", "pass");
mysql_select_db ("datebase");
$result = mysql_query ("SELECT link FROM id WHERE number=$locn");
$row = mysql_fetch_array($result);
header("Location: " . $row["link"]);
mysql_close ($link);
?>

View Replies !
Jump Script And Wordpress
I created a very simple jump script, and then edited a page on my blog so the links use the jump script links. I followed a template, and triple checked all the code, so I am sure that part is right. My question is, where do I put the actual .php file so the links in the jump script actually pick up the code and go where they are supposed to go?

I tried a variety of folders (public_html, themes folder, actual theme folder, etc.), but none made the script work. unless I am (quite possibly) missing something else?

View Replies !
Jump To Letter In Paginated Results
I'm on a project that has paginated results coming from MySQL, say ten records on a page. Let's say that the results contain a song title. What would be the best method for me to write a script that could take a user to whichever page has the first song title starting with B?

Basically, the client wants a list of letters at the bottom that take the user to the page that records beginning with the selected letter begin on. Advice? Am I going to have to loop through the results and count the positions of the letters, and then calculate which page that position would be on?

View Replies !
Jump Menu Call Page
Is it possible to use a jump menu to call a page within a page? To be clearer. I can place an " include ('whatever.php'); " within my page which is fine. But i would like this include to be a variable set by the options within a jump menu. So when I select from the menu the include will swap from its default to the newly selected one. Am I making sense?

View Replies !
How To Create A Jump-menu Using Dreamweaver?
I have 50 names and links I need to show up alphabetically in a jump-menu. I'm pretty green with php and databases. Is there a quick and easy way to accomplish this? I know how to create a jump-menu using Dreamweaver, but how would I set it to read the text file.

View Replies !
Possible To Abort A Script And Jump To The Next Block Of Code?
I was wondering if it is possible to create a button/link that would let a user stop the execution of that piece of code and then resume execution starting with the next 'block' of code. 

View Replies !
Script That Is A Bit Like A Jump Menu But Without The Pull Down List.
I am looking for a script that is a bit like a jump menu but without the pull down list. I want users to be able to enter a post code (4 digits) and then be redirected to a web page based on that post code as each web page is different per code.

the jump menu provided in dreamweaver is almost there but as there are thousands of codes it is impractical to have them drop down.

View Replies !
How I Can Make A List That Acts Like A Html Jump Menu?
how I can make a list that acts like a html jump menu (for a regular list I have to use a "Go" button in order to achieve the desired behaviour and jump menus I cannot use because they work only with links to other pages).

For example,I want such a list filled with questions from my db and when I select one I want to see its possible answers; the page stays the same, only its data differs based on the selection. Or you can have a look at such a jump menu on this website, the one with options for geting to various sections of the forum.

View Replies !
Header Problem - Insert The Info Below And Then Jump Back To A Page.
i want to insert the info below and then jump back to a page. Here is insert and the header statement: PHP Code:

View Replies !
Unable To Set Cookie!
I'm unable to set cookie! I have tried a lot of codes, but it doesn't work! I don't get any error message, but the script doesn't set cookie. Below is my code:

View Replies !
Unable To Connect
Here is the setup:

Server:
-SQL 2000 SP3 on a win2k box
-Firewall set up to allow connections for all ports
ntwdblib.dll version 2.8.0 (newest)

Client:
XP Pro SP2
Apache 2.0.52
PHP 4.3.8.8
ntwdblib.dll version 2.8.0 (copied from server)
extension=php_mssql.dll uncommented

i am unable to connect to MSSQL, PHP4 through Windows XP.

View Replies !
Unable To Install PHP
I compile the latest source for php, but when I try to load php module in Apache, I get this error message:

Cannot load /usr/local/apache2/modules/libphp5.so into server:

/usr/local/apache2/modules/libphp5.so: undefined symbol: _efree

View Replies !
Unable To Insert
Might someone be able to tell me what is wrong with this query? Can't get it to send the data to the db.

<?
$date = date("Y-m-d G:i:s") ;
$db="dbname";
mysql_query ("INSERT INTO dbname (var1, var2, var3, IP) VALUES ($_POST['var1'],$_POST['var2'],$_POST['var3'],$_POST['IP'])$db");
?>

View Replies !
Unable To Add To Database Through PHP
I have written a short file called config.php that contains all of the connectivity scripting and also a db_close.php that contains the closing script. These 2 files are used thoughout the pages that I have written, so I know that the connectivity is working fine. Here is the issue.

I run a simple mysql query that inserts some values into a table. After submiting the values, the script continues as if the values have been added properly, but in fact they haven't been added at all. My problem is that I do not know why it isn't being added because it return NO error in this process. Am I supposed to add some code that returns the mysql errors? Below is the line that adds the field. If this is supposed to be posted in the MySQL forum, please move it. If more info is needed pls respond.

include("scripts/config.php");

mysql_query("insert into clients values
('$clientid', '$assoc', '$fn', '$ln', '$gender',
'$dob', '$phoneh', '$phonec', '$phonew', '$email1',
'$email2', '$email3', '$email4', '$email5',
'$fnd', '$lnd', '$fnm', '$lnm', '$phonecd', '$phonecm',
'$phonewd', '$phonewm', '$fax', '$address', '$city',
'$province', '$pc', '$school', '$occupation', '$balance',
'$notes', '$lastlog'");

include("scripts/db_close.php");

View Replies !
Unable To Upload
I'm not being able to upload at all, I tried to paste the sample included in the documentation and here is what came out: Code:

View Replies !
Pagination Needs Help
I'm having trouble with pagination and haven't been able to find a site or thread to help. Here's what I'm doing:

I want to display only part of an article. The text from the field ('description')will contain hundreds of characters...I want to limit those characters at let's say...150, and display a "Read On..." link after that, that will link to a page that displays the entire article.

View Replies !
How To Use Pagination
I have 7 columns in the table. The first 2 columns should not be changed and last 5 columns is used in pagination of columns.

How can I proceed with this.
Last 5 columns is users and when I click on NEXT the columns should change from A1 A2 A3 A4 A5 to A6 A7 A8 A9 A10. I should use pagination columnwise.

View Replies !
Php Pagination
I have implemented this but i seem to be having problems. When i go to the next page it changes this statement:

select * from sellproperty WHERE buylet='Buy' limit -10, 10
to this when i click on e.g. page 2.

select * from sellproperty WHERE buylet='Buy' limit 0, 10
but it does not like this statement and throws an error because it should be 10, 10 not -10, 10 i assume .

Now this is not the only problem i am having. I would have thought that when i go through the pages it would go up like so 10, 10 - 20, 10 - 30, 10 etc but page 1, 2 and 3 all say -10, 10.

My first question is how do i remove the - and also why is my code not going up in 10's? Code:

View Replies !
Pagination.
I've found a tutorial on pagination, seems like a decent tutorial.  However, all the tutorials i have seen on this subject, always use the "Select * FROM <table>".

My queries almost always have a Where statement inbedded into it.  How can i use my queries while still maintaining the tutorials guide, example of where my problem lies is below: Code:

View Replies !
Getting A Url For Pagination
Is there a fasterway that doing a foreach($_GET) to get the 1,2,3,4 on a pagination??

View Replies !
Best Way Of Pagination.
which would you consider the best way of doing pagination?

by putting the result in a array or by using mysql.

right now i have it with mysql but i was thinking about putting all result in a array and then do the paging threw an array, but i dont know about speeds in php.

which way would be faster?

View Replies !
Pagination Again-New To PHP
I am taking input from a form and getting result into the pagination(result.php)

so the search i give is:

$totalCount = "select * from student_adv where name like '%$_POST[search]%'";

my pagination works fine when i hard code the valie of $_POST[search] as John or similar..

but when i go to the next page i get the error as:

"Notice: Undefined index: search in C:Program FilesApache Software FoundationApache2.2htdocs
esult.php on line 56"

i tried putting the value of $_POST[search] in hidden variable-it did not work. I know there is a way out-but wots it- any body got any idea? is the problem because of $_POST[search] or there could be some other problem?

View Replies !
No Pagination
I'm creating a portfolio-website. On the homepage, I want to show a single "featured" project, with a short description and a link to the full project. When a user arrives at the homepage I want to show the first "featuerd" project, but there should also be a previous and next link, so that the user can cycle through all featured projects. I'm having two problems. prev() and next() resets the pointer in the array to another key than the current one.

How can I prevent this? To be able to cycle through the projects, when the current project shown is the first in line, the previous-link should point to the last project in the array. Same holds true when the current project is the last one. I just can't get this to work. I don't think it's a pagination problem I'm looking at here, since I don't want to number anything. Or am I completely off?

View Replies !
Pagination In Php
Anyone here has a working example of pagination in php that's willing to share? I found a lot of things on google, but none of them works and i am a bit lost about how to fix the errors.

View Replies !
Pagination....
I've seen the pagination script for getting results from the sql server etc. say if i had a webpage config.php and i wanted it to have like 1 form divided into 3 sections like core config, accessories, extras. I wanted each to be on a different page. like a computer configurator at alienware.com how could i do this? i would manually choose where each section starts and ends and only display 1 section at a time.

View Replies !
Need Help With Pagination
i am starting coding a new db and need to understand how pagination works from scratch. at the simplest level, i have php file that uses this command amongst others.

$query = "select title, description, date from reslink where category_id=1 LIMIT 10";

bearing in mind that this entry would produce 1000 results, i need a way to break the entries down into 10 at a time. a friend of mine suggested i should look at pagination. i would be grateful if someone could give me a kickstart so i can start getting this to work.

View Replies !
Use Pagination
I've read all the posts regarding getting help with setting up and implementing pagination. The one thing that I haven't found is why people use it at all? Does it help with bandwidth usage? Is it just to help organize search results? I'm just curious as to the reasons pro/con for implementing it.

View Replies !
Pagination
Heres the code: PHP Code:

$limit          = 50;               
$query_count    = "SELECT count(*) FROM REVIEW";    
$result_count   = mysql_query($query_count);    
$totalrows      = mysql_num_rows($result_count);
    if(empty($page)){
        $page = 1;
    }
$limitvalue = $page * $limit - ($limit);
$query  = "SELECT ID, DATE_FORMAT(R_Date, '%c/%e/%Y') as date, ASP_Name, Username FROM REVIEW ORDER BY R_Date DESC LIMIT $limitvalue, $limit";        
$total = mysql_num_rows($query);

$real_result = mysql_query($query) or die("Error: " . mysql_error()); //Do the query
if(mysql_num_rows($real_result))// There are rows in the result.

View Replies !
Unable To Upload PHP Extensions
I've come across a wierd thing in my PHP configuration. Just yesterday, I upgraded everything I had. Apache to 1.3.22, PHP to 4.1, and MySQL to 3.23.46. Everything went well and I was up and running in no time and even got Zend Optimizer to work. The problem submerged when I started adding PHP extensions. The PHP 4.1 distribution contains a lot of extensions with it. I chose modules like zlib, gd, etc. For some reason I could not get LDAP module or PDF module to work. When Apache loads, I get this message:

View Replies !
Unable To Connect To Certain SQL Servers From PHP On IIS.
I am unable to connect to certain SQL servers from PHP on IIS.

I have two IIS 5 servers, both are Windows 2000 Server boxes with PHP
4.3.4 and MDAC 2.80.1022.3. I have three SQL Server machines - two
SQL2K SP3a machines and one SQL 7.0 SP4 machine. One of the SQL2K
servers is the same machine as one of the IIS 5 servers.

One of the IIS servers, Server1, can mssql_connect to all three SQL
servers. The other IIS server, Server2, can only mssql_connect to one
of the SQL2K servers. I get a "connect failed" error when attempting
to hit the other two SQL servers. The one it can connect to,
incidentally, is the SQL server that resides on the _other_ IIS
server.

I have tried copying the PHP application from Server1 to Server2. The
same PHP app that can connect to all three SQL Servers from Server1
can only connect to SQL on Server1 from Server2.

Here's a chart of the servers:

ServerName |OS |SQL Version |PHP Can connect to...
-------------|-----------|----------------|-------------------------
Server1 |Win2k Svr |SQL2K SP3a |Server1, Server3, Server4
Server2 |Win2k Svr |N/A |Server1
Server3 |NT 4.0 |SQL7 SP4 |N/A
Server4 |Win2k3Svr |SQL2K SP3a |N/A

View Replies !
Exec(): Unable To Fork
I am trying to use exec() on windows IIS ,but i get the following error Code:

Warning: exec(): Unable to fork [html2pdf.exe "http://www.yahoo.com/" "yahoo.pdf"] in c:inetpubwwwrootoctsuppublicationpublicationreport2.php on line 62

and the code that i used is Code:

<? $convertpdfprg="html2pdf.exe "http://www.yahoo.com/" "yahoo.pdf"";
$checkvar=exec($convertpdfprg);?>

View Replies !
Unable To Use $_SERVER['HTTP_REFERER']
Any ideas why I'm not able to use $_SERVER['HTTP_REFERER'] on my
shared hosting account (PHP 4.1.2), but I can on my local server (PHP
4.3.3)?

I imagine it has something to do with the different versions of PHP or
perhaps php.ini, but I'm not sure what?

View Replies !
Unable To Load Library?
I restarted my virtual server on Friday night and since then I've been getting these emails every 10 minutes (there's a Cronjob scheduled to execute). Problem is, I have no idea what it means or why the error is suddenly occuring..

PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/pgsql.so' - libpq.so.3: cannot open shared object file: No such file or directory in Unknown on line 0

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved