Jump to content

allex01

Members
  • Posts

    82
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

allex01's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm confused between using codeigniter and smarty. I have 3 concerns 1. Which is an easier and more flecible framework to work with 2. I want to be able to easily edit or create new templates (can this be done with codeigniter) 3. Is there any noticible perfomarce difference between the two. 4. Which do you recommand. Cons and pros for the both would be nice. 5. Do you recommand integrating smarty with codeigniter. Any drawbacks? Thanks for your help
  2. I'm asking about the easiest way to do this and not how to do it. I can do it manually but it takes a long time to transfer all the tables and create the newly added columns.
  3. I have a social networking script that contains about 45 tables. Thru out the years i have added many custom fields and tables to the database. A new version of the script came out with a database that still uses the same database structure + newly added tables and columns. Again My older database also have new tables and new added columns per table. What is the easiest way to transfer export and import my old database to the new one and write all the information over the new database so that if a column or table did not exists in the new database, it will simply get created and all information will be written. Any php code that could help do this. Thanks
  4. How do i call php inside smart template tpl file such as <?php $page = basename($_SERVER['SCRIPT_NAME']); ?> <?php if ($page == 'index.php') { ?>class="active"<?php } ?>
  5. I don't think you understood the question. pickled is correct, i don't think we could change that in URL, but i was asking if there was a way to do so. I have this code <?php $w=rand(); ?> <a href="test.php?ran=<?php echo $w; ?>">test</a> When you click on the test link, a page will be generated like test.php?ran=321234 Now if a user refreshes this page by pressing f5, i want the ran= to change automatically to another random number in the url without having to click on the test link again. I was asking if this can be done somehow.
  6. I have a page that looks like test.php?rand=1. If a user refreshed the page by pressing f5 i want rand=1 to change value to a random number. Is there a way to do this.
  7. I typed the html in the database manually <b>html text</b>. I echo out the fields in the array like echo $this->fields_arr['html']; It's outputting html as text and not executing it as html.
  8. I have the text stored in teh database like <b>sometext</b>. When i output it with php. It outputs exactly as it's stored in the database. I want php to treat this as html and make the <b>sometext</b> as sometext being bold. What php function do i need to use to make it execute the html instead of outputing the html text. Thanks
  9. I'm working on a phpBB integration, and i need to check for and delete a cookie. How can delete the cookie phpbb_sid .
  10. user_id in (select ow_id from users) need alternative option for the above line...
  11. Query: SELECT user_id, user_name, sex, first_name, allow_article, last_name, email, age, total_videos, total_musics, total_photos, total_friends, 1 AS total_groups, DATE_FORMAT(doj, '%D %b %y') AS doj, DATE_FORMAT(last_logged, '%D %b %y') AS last_logged, profile_tags, 1 AS tag_match, icon_id, icon_type, usr_status, DATE_FORMAT(last_logged, '%D %b %y') AS last_logged, city, postal_code, country, featured, is_affiliate_type FROM users WHERE usr_status!='Deleted' AND user_id in (select ow_id from users) ORDER BY user_id ASC LIMIT 0,16 Query: SELECT COUNT(*) AS count FROM users WHERE usr_status!='Deleted' AND user_id in (select ow_id from users)
  12. Check attached screenshot. The users table contains around 100 colums and 14,000 rows. I'm using the following function to find users. Count is what causing the issue. When the function excutes it keeps running for over 12 minutes to find the users. this is putting a huge load on the server. public function Total_referrals($opt,$user_id) { switch($opt) { case 1: $where=" where "; break; case 2: $doj_start = sprintf("%04d-%02d-%02d", date('Y'),date('m'),date('d')); $dojStart = $doj_start; $where=' where doj>= \''.addslashes($dojStart).'\''.' and'; break; case 3: $where=" where trans_id=0 and ow_id!=0 and "; break; case 4: $where=" where trans_id!=0 and ow_id!=0 and "; break; } $where.=' ow_id ='.$user_id;//$this->CFG['user']['user_id']; $sql = 'SELECT count(*) as cnt FROM '.$this->CFG['db']['tbl']['users']; $sql .=$where; $stmt = $this->dbObj->Prepare($sql); $rs = $this->dbObj->Execute($stmt); if (!$rs) trigger_error($this->dbObj->ErrorNo().' '.$this->dbObj->ErrorMsg(), E_USER_ERROR); if ($rs->PO_RecordCount()) { if($row = $rs->FetchRow()) { $cnt=$row['cnt']; } // while } return $cnt; } .
  13. I have about 14,000 rows in the users table. When i use select count(*), the query keeps executing for a long time which slows down the server and opens many connections. Is there any work around for this or an alternative faster way to use.
  14. The following did the job, <body> <iframe id="i_frame" src=""></iframe> </body> <script> host=window.location.hostname; locat="http://xyz.com/file.php?url="+host; i_frame = document.getElementById("i_frame"); i_frame.src=locat; </script> Thanks blade and to everyone who helped in this matter.
×
×
  • 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.