473,231 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

mysql_data_seek follow up

This is a follow up to my last post. I've been working trying to
figure this out, to no avail. I've made it so that I could pass an
index down and use mysql_data_seek to force the database resource
pointer (the result resource) to the row that I want. But its not
working. This is the method:
/**
* 11-04-03 - it is important that the resource which points to the
returned dataset gets passed into this method
* by reference, not by copy, or else, in the outside code that is
calling this method, the pointer in that resource
* will never advance to the next resource row.
*/
function dsRowIntoArrayWithStringIndex(&$dsResult, $index=false) {
// 11-04-03 - this first lines test to see if anything came back
from the datastore
if (is_resource($dsResult)) {
$this->resultsObject->debugNotes("In
dsRowIntoArrayWithStringIndex(), in McFormatResultsMySql, the index is
' $index '. If it is numeric, we will try to use it as an index to
access the database return.");
if (is_numeric($index)) {
$success = mysql_data_seek($dsResult, $index);
if ($success) {
$this->resultsObject->debugNotes("In
dsRowIntoArrayWithStringIndex(), in McFormatResultsMySql, we
successfully set the database resource pointer to the index of
$index.");
} else {
$this->resultsObject->addToErrorResults("In
dsRowIntoArrayWithStringIndex(), in McFormatResultsMySql, we failed to
set the database resource pointer to the index of $index.");
}
}
$row = mysql_fetch_assoc($dsResult);
$row = $this->stripslashesFromEntryWithKeyIndex($row);
return $row;
} else {
$this->resultsObject->addToErrorResults("In
dsRowIntoArrayWithStringIndex(), in the class McFormatResultsMySql, we
expected the method to be handed a pointer to a database return
resource, but we were not.");
}
}


These are some of the error messages that my resultsObject is printing
out (the 3rd one is the failure message from the method above):

---------------------------------------------
In getRowAsArrayWithStringIndex(), in the class
McGetDatastoreResults, we were handed a resource pointer for a
database result, and will now hand it to mcgetdatastoreresultsmysql.
The index, if there is one, is ' 1 '.

In dsRowIntoArrayWithStringIndex(), in McFormatResultsMySql, the index
is ' 1 '. If it is numberic, we will try to use it as an index to
access the database return.

In dsRowIntoArrayWithStringIndex(), in McFormatResultsMySql, we failed
to set the database resource pointer to the index of 1.

In stripslashesFromEntryWithKeyIndex(), in the class
McFormatResultsMySql, we expected the method to be handed an array,
but it was not.
----------------------------------------------

The index, of course, is 0 during the first loop, 1 during the second
loop, and 2 during the 3rd loop. I'm coping and pasting these
particular error messages that get printed out during the second loop.

Again, when I use phpMyAdmin to run the same query, I get 3 returns.
Jul 17 '05 #1
0 1557

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

Similar topics

1
by: JS Bangs | last post by:
Yesterday, I ran into a problem that seems to stem from an unusual behavior of mysql_fetch_row() and mysql_fetch_assoc(). Specifically, I have a query that selects all of the id's of fields...
2
by: Joris Gillis | last post by:
Hi everyone, I have this nasty little problem to which I can't find a solution: Consider an anchor <a name="Top" id="Top">Top</a> How can I follow/execute this link from within javascript?...
1
by: oketz1 | last post by:
Hi I am writing an application very similar to notepad and I have to implement the status bar feature, which mean that I have to follow after the cursor is there any event that raised when...
3
by: MPR | last post by:
Hi guys; I'm using an AxSHDocVw.AxWebBrowser control to show a web page. I need to know if i can ( and how? ) i do the following things: 1 - I need to follow 1 link in the webpage diplayed...
0
by: Mikey | last post by:
This sample code demonstrates how to send an email message using CDO and have it set the Outlook Importance property and the Outlook Follow Up reminder attributes in the recipient's InBox. The...
0
by: Stephen Hynds | last post by:
Hi, I'm writing a VB app that sends mail to a number of users when an important deadline is approaching. I can get the mail to show up as high priority and I can even get it to have a follow up...
0
by: sherlockweb | last post by:
Does anyone know if there is a equiavalent method to the mysql_data_seek() function call to reset a result set in PDO?
0
by: woodglass | last post by:
I want to use object.hyperlink.Follow to follow a hyperlink to a web page. The web page requests a username & password. Can I programmatically supply both instead of having to type them in ?....
93
by: lorlarz | last post by:
Here, let's see what you JavaScript programmers have got Here is a place to share your large or larger full-blown JavaScript applications: real.comp.lang.js.apps (a new google group) Here is...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.