Jump to content

Facebook App Mysql showing wrong data?


Tycho

Recommended Posts

Hello and thanks in advanced.. Here is my situation:

 

I am developing a facebook application and the page is being called from my own site. The problem is this page is pulling information from the database but it seems to be old and inaccurate?

 

Excerpt from array in page outputting directly from database:

[modified] => 2009-03-07 18:52:25

[winner_id] => 0

[price] => 0.01

[closed] => 0

 

This is directly from inside phpymyadmin:

modified = 2009-03-09 19:01:05

winner_id = 119

price = 0.23

closed = 1

 

So when I hit my page I get the outputted data that is incorrect, then I instantly go inside of phpmyadmin and see the correct data. I am a developer of almost 4 years and have never seen this before. The strange part is the incorrect data never changes.

 

This has been holding me up for a long time, I hope someone else has had this issue and can help me.

 

Jake

Link to comment
https://forums.phpfreaks.com/topic/148924-facebook-app-mysql-showing-wrong-data/
Share on other sites

$dbhost = 'localhost';

$dbname = '(not shown)';

$dbuser = '(not shown)';

$dbpasswd = '(not shown)';

 

mysql_connect($dbhost,$dbuser,$dbpasswd) or die('Currently running maintenance.');

mysql_select_db($dbname) or die(mysql_error());

 

$auction = mysql_fetch_array(mysql_query("select * from auctions where id = 84"));

print_r($auction);

 

****

Output:

Array ( [0] => 84 [id] => 84 [1] => 29 [product_id] => 29 [2] => 2009-03-05 11:25:30 [start_time] => 2009-03-05 11:25:30 [3] => 2009-03-10 11:26:10 [end_time] => 2009-03-10 11:26:10 [4] => 0 [max_end] => 0 [5] => 2009-03-04 22:43:30 [max_end_time] => 2009-03-04 22:43:30 [6] => 0.41 [price] => 0.41 [7] => 0 [autolist] => 0 [8] => 1 [featured] => 1 [9] => 0 [peak_only] => 0 [10] => 0 [nail_bitter] => 0 [11] => 0 [penny] => 0 [12] => 0 [autobids] => 0 [13] => 124.80 [minimum_price] => 124.80 [14] => 98 [leader_id] => 98 [15] => 0 [winner_id] => 0 [16] => 0 [status_id] => 0 [17] => 1 [active] => 1 [18] => 0 [closed] => 0 [19] => 0 [bid_debit] => 0 [20] => 2009-03-04 22:44:05 [created] => 2009-03-04 22:44:05 [21] => 2009-03-07 12:40:09 [modified] => 2009-03-07 12:40:09 )

 

***

PHPmyadmin:

 

`id`, `product_id`, `start_time`, `end_time`, `max_end`, `max_end_time`, `price`, `autolist`, `featured`, `peak_only`, `nail_bitter`, `penny`, `autobids`, `minimum_price`, `leader_id`, `winner_id`, `status_id`, `active`, `closed`, `bid_debit`, `created`, `modified`) VALUES

(84, 29, '2009-03-05 11:25:30', '2009-03-10 12:04:50', 0, '2009-03-04 22:43:30', '23.61', 0, 1, 0, 0, 0, 21, '144.50', 191, 191, 0, 1, 1, 0, '2009-03-04 22:44:05', '2009-03-10 12:04:50'

 

The data in the database is not the same as the data from the page.

 

I also failed to mention that the database resides on one domain and I am accessing it from another domain. Both domains are hosted on the same server.

 

http://www.bidaggle.com/test2.php

 

http://www.bidaggle.net/facebook/test.php

 

Both sites connect just fine to the one database, however the .com is the site that has the correct data.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.