Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7044483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:24:54+00:00 2026-05-28T02:24:54+00:00

Hi i’ve been working on a task of porting some code from some old

  • 0

Hi i’ve been working on a task of porting some code from some old postgresql driven site to a newer and imported site running against mysql. There are some sections of code that use’s function calls like:

$DataArrDT = pg_fetch_array($result,$i);

Then later on in the code there are sections like:

if ($DataArrDT[0]=="")

based on the index of the datatable array, different sections to tables are constructed for visibility.

However, when the code was modified to hand the mysql_fetch_array function call tons and tons of warnings are thrown. I completely expected that; however, i’ve been working for quite some time attempting to resolve them, and i’ve reached my knowledge banks dead end.

here is what i attempted:

 $DataArrDT = mysql_fetch_array($result,$i);

or

$DataArrDT = mysql_fetch_assoc($result,$i);

regardless of the selection i still receive errors like:

Notice: Undefined offset: 5 in .php on line xxx

And those undefined offset warnings typically go hand-in-hand with

Warning: mysql_fetch_assoc() [function.mysql-fetch-assoc]:
The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH in .php on line xxx

If there is something i’m missing to help you provide feedback on how to resolve, please let me know and i’ll add to the initial posts. this is something i need to figure out. If there is a link i should read also post that so in the future i can expand my depth.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:24:55+00:00Added an answer on May 28, 2026 at 2:24 am

    The functions pg_fetch_array() and mysql_fetch_array() are not exactly the same. pg_fetch_array() receives three parameters, but mysql_fetch_array() only two. The parameter not supported by mysql_fetch_array() is precisely the one being used in your case. $i, as far as I can see, and according to the reference:

    http://php.net/manual/en/function.pg-fetch-array.php

    is used to indicate: Row number in result to fetch. That option is not available in the mysql version, check it out:

    http://php.net/manual/en/function.mysql-fetch-array.php

    I can’t tell you right now about an alternative, as I’m not pretty sure what the code is intended to do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.