MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 4th, 2000, 03:40 PM
toxicbuddha toxicbuddha is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Germany
Posts: 2 toxicbuddha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to toxicbuddha
I use the following small programm as a linkcounter:
It works, but there is a bug in it I cannot kill:

<?php
mysql_connect("localhost");
$identid =mysql_db_query("test","select votes from counting WHERE (name='Jana')");

while($line = mysql_fetch_row($anweisungsid)) {
$votes = $line[0] + 1;
}
mysql_query("update counting SET votes='$votes' WHERE (name = 'Jana')");

echo "<TABLE><TR><TD WIDTH=70% VALIGN='top'><H3>Jana:</H3></TD><TD VALIGN='top' WIDTH=30%><SPAN STYLE=color:red><H3>$votes</H3></SPAN></TD></TR></TABLE>";
include("link.html")
?>

When you start it works fine.
Click on the girl number 1 and her votes will be increased.
Click next on the girl numer 2 and her votes will be increased.
Click next on the girl number 3 and her votes will be increased.

BUT NOW:
If you click on whatever girl her votes will NOT be increased.
Only if you click again on the same girl her votes will be increased. If you click once again on her it will increase her votes again.
So what is it?

Any help would be very much appreciated.
You can find the website on www.hookers.de. (Link on the left side: PHP-SQL)
The direct link is www.hookers.de/phpsites/php_frame.html

Reply With Quote
  #2  
Old February 7th, 2000, 07:11 AM
PAV PAV is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Netherlands
Posts: 77 PAV User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Hi Toxicbuddha,

The only thing I can see is that you must not mix up english and german ids:

>>$identid =mysql_db_query

>>while($line = mysql_fetch_row($anweisungsid))

PHP only understands PHP and did not learn any other languages!

Happy coding,

Peter

Reply With Quote
  #3  
Old February 8th, 2000, 05:31 PM
toxicbuddha toxicbuddha is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2000
Location: Germany
Posts: 2 toxicbuddha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to toxicbuddha
[QUOTE]Originally posted by PAV:
[B]Hi Toxicbuddha,

The only thing I can see is that you must not mix up english and german ids:

>>$identid =mysql_db_query

>>while($line = mysql_fetch_row($anweisungsid))

hi peter,
the original code is not mixed up, I wanted to "translate" the code for english readers when I posted it, otherwise it would have not work at all, I suppose URL).
but thanxs for your hint nevertheless.

I have seen in the meantime that with simple html-coding <meta http-equiv="expires" content="0"> the script works fine on windows98 with apache - but not on the unix server.

toxicbuddha

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Beginner: bug in linkcounter (using mysql and php)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway