Jump to content


Photo

Newly added rows don't display all fields


  • Please log in to reply
9 replies to this topic

#1 fil2550

fil2550

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 07 February 2013 - 03:18 PM

Hi all. I have a wonderfully well-working MYSQL database accessed by PHP, but for some reason newly added table rows won't display information from one particular field. I checked for strange/hidden characters, ran some generic test entries, but nothing seems to work. All previous entries still work just fine. Am wondering if I have hit some sort of limit.

PHP Version 5.3.10-1ubuntu3.5
MySQL client version: 5.5.29

#2 Barand

Barand

    Sen . ( ile || sei )

  • Gurus
  • 14,184 posts
  • LocationCheshire, UK

Posted 07 February 2013 - 03:58 PM

Am wondering if I have hit some sort of limit.


Have you got over 4,000,000,000 rows in the table?

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts
|baaSelect| generate js and php code for dynamic linked dropdowns

 


#3 DaveyK

DaveyK

    Advanced Member

  • Members
  • PipPipPip
  • 288 posts
  • LocationThe Netherlands

Posted 07 February 2013 - 04:11 PM

haha. have you tried echoing (var_dump()) all the correct variables from your form before you actually send them in the sql?

#4 fil2550

fil2550

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 07 February 2013 - 05:19 PM

Only have a few hundred rows in my table. I ran the same SQL query via PHPMyAdmin and had it return the results flawlessly. Why would ~150 rows worth of data work perfectly, and then newly added ones dump the output of one particular field. Pounding my head into a wall over this one. All new entries are doing the same. Thanks for the help people.

#5 Barand

Barand

    Sen . ( ile || sei )

  • Gurus
  • 14,184 posts
  • LocationCheshire, UK

Posted 07 February 2013 - 06:36 PM

I'd take a close look at the code that is currently adding records to that table

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts
|baaSelect| generate js and php code for dynamic linked dropdowns

 


#6 fil2550

fil2550

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 07 February 2013 - 07:38 PM

Thanks Barand, but I input all my data by hand using phpmyadmin, and haven't changed anything recently.

#7 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 07 February 2013 - 08:02 PM

If the data shows up in PHPMyAdmin, then the problem is the PHP code that displays the data on your webpage. We can't help without seeing the data and the code.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!

#8 fil2550

fil2550

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 07 February 2013 - 09:34 PM

Thanks Jessica. Much appreciated. But again, every last entry has no issues with the php code. I have several other tables interlinked in the database to make things work, and I've checked all that as well. I've ran test runs in other tables just to make sure, and there are no problems. Just this one here.

It makes absolutely no sense. Why would 150+ examples work flawlessly and now new additions don't? Again, I checked, made sure I didn't have any hidden characters in my new data that would muck up the code.

I'll post my php code if y'all think it'd be helpfull, but I'm thinking that this is a problem with MYSQL and am not sure what to do.

Ugh. Thanks for your help everyone.

#9 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 07 February 2013 - 09:38 PM

When you say the new rows don't display information that doesn't make sense. Rows are stored info. Either you're using PHP or the mysql interface to view them. WHAT is it that makes you think there is a problem??
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!

#10 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 07 February 2013 - 09:45 PM

phpmyadmin IS A PHP SCRIPT. If it displays the data correctly, that means that YOUR PHP CODE is where the problem lies. The quicker you post the code that reproduces the problem, the quicker someone can answer -

Why would 150+ examples work flawlessly and now new additions don't?


Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com