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 8159039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:47:36+00:00 2026-06-06T17:47:36+00:00

I’m new to using the data type POINT in MYSQL so I wanted to

  • 0

I’m new to using the data type POINT in MYSQL so I wanted to test an output to a table in PHP but I’m getting the error “Undefined index”. How can I fix the this error and display the points in the table?

The error message
Notice: Undefined index: my_point in C:\xampp\htdocs\view.php on line 23

(The points do not show in the table. How can I fix this?)

MYSQL Table

/*Table structure for table highcharts_php */

            CREATE TABLE `highcharts_php` (
              `id` int(11) NOT NULL AUTO_INCREMENT,
              `run_name` varchar(150) DEFAULT NULL,
              `my_point` POINT DEFAULT NULL,
              `cur_timestamp`  TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
               PRIMARY KEY (`id`)

            ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;
              SET time_zone='+00:00';
            /*Data for the table `highcharts_php` */

            insert into highcharts_php (`id`,`run_name`,`cur_timestamp`,`my_point`) values ( 1, 'SSTP Keystone COOPER','2012-06-28 00:00:01', GeomFromText( ' POINT(0.6 70.18) ' ) )

*PHP Code*

            <?php
            $con = mysql_connect("localhost","root","xxxxxxxx");
            if (!$con)
              {
              die('Could not connect: ' . mysql_error());
              }

            mysql_select_db("graph", $con);
            /*$result = mysql_query("SELECT * FROM highcharts_php");*/
            $result = mysql_query("SELECT run_name,cur_timestamp, x( my_point ), y( my_point ) FROM highcharts_php LIMIT 0 , 30")or die 
            (mysql_error());
            echo "<table border='1'>
            <tr>
            <th>run_name</th>
            <th>my_point</th>
            <th>cur_timestamp</th>
            </tr>";

            while($row = mysql_fetch_array($result))
              {
              echo "<tr>";
              echo "<td>" . $row['run_name'] . "</td>";
              echo "<td>" . $row['my_point'] . "</td>";
              echo "<td>" . $row['cur_timestamp'] . "</td>";
              echo "</tr>";
              }
            echo "</table>";

            mysql_close($con);
            ?> 
  • 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-06-06T17:47:38+00:00Added an answer on June 6, 2026 at 5:47 pm

    You need a column alias for your two calculated columns:

    $result = mysql_query("
      SELECT 
        run_name,
        cur_timestamp,
        /* Column aliases via AS */
        x( my_point ) AS my_point_x, 
        y( my_point ) AS my_point_y 
      FROM highcharts_php LIMIT 0 , 30") or die();
    

    Access them as $row['my_point_x'], $row['my_point_y'].

    Without column aliases, they exist in your $row as $row['x( my_point )'], $row['y (my_point)'], exactly as they appeared in your SELECT list.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I want to construct a data frame in an Rcpp function, but when I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

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.