|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
This is my first post in this forum. What this code suppose to do is to check whether user has download more than 3. If < 3 they will redirect to download.php page but if = 3 user will be redirect to index.php page. This is the closes I can get but still one error left... what is wrong this code... PHP Code:
This is what I run in phymyadmin: Code:
CREATE TABLE `downloads` ( `id` int(11) auto_increment, `ip` varchar(15) NOT NULL, `time` TIME NOT NULL, PRIMARY KEY (`id`) ) This is the error: Code:
Database Error Message: Result ID: 1 could not be freed. Date: Sunday, September 7, 2008 at 2:38:27 PM Script: /lol/test.php or view error image here > http://www.freeimagehosting.net/uploads/92954369b4.png Any idea what Result ID : 1 could not be freed might be?? Problem with php code or database Thanks in advance. ![]() Last edited by sg552 : September 8th, 2008 at 01:27 PM. Reason: picture gone? |
|
#2
|
||||
|
||||
|
Do you ever call mysql_free_result() from your database code? That's probably it. Otherwise, sounds like a database error. What database are you using?
-Dan
__________________
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002 If I have nothing to hide, you have no reason to search me. |
|
#3
|
|||
|
|||
|
I try to use the mysql_free_result() it still give me error.
PHP Code:
So since $iplocked['number'] will compare with $config['download_limit'] so I use them in mysql_free_result. Any idea I use mysql by the way. If you have any code that can limit user download similar like this please reply here. Thanks in advance ![]() |
|
#4
|
|||
|
|||
|
Problem solved
thanks for all the help!! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > Limit number of downloads per IP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|