View Single Post
  #27  
Old 03-19-2012, 01:21 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,346
Hall of Famer is on a distinguished road
Default

@ Silverdragontears:
You mean to count number of rows? With the new script you will have to write these:

PHP Code:
$stmt $adopts->query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner='".$loggedinname."' AND currentlevel<='3' AND isfrozen='no'");
$data $stmt->fetchAll();
$num count($data);

if(
$num >= 5){ 
$canadopt "no"
$article_title "Too many eggs!"$article_content "You already have too many eggs to take care of! Come back once you have hatched an egg!"

In future we will implement a database class that comes with a num_rows() method so you can call easily.

@Fadillzzz:
I see, its weird how I never noticed eregi() being used in the script right from the start. Was it deprecated in the new PHP versions? If so, we have to update the script asap.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.