Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

QuickOldCar last won the day on July 11 2016

QuickOldCar had the most liked content!

About QuickOldCar

  • Birthday 06/23/1971

Contact Methods

  • AIM
    quickoldcar
  • Website URL
    http://dynainternet.com

Profile Information

  • Gender
    Male
  • Location
    NorthEast Pennsylvania

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

QuickOldCar's Achievements

Regular Member

Regular Member (3/5)

119

Reputation

14

Community Answers

  1. Not enough of your code to tell exact. You do that within your loop. while($row=...................){ if($row('id') == $post_id){ echo "trending"; //$trending = true; } }
  2. Something crashed or server closed while was changing records mysql, need to do a repair on the table. http://dev.mysql.com/doc/refman/5.7/en/repair-table.html In phpmyadmin can checkmark the table and below is a dropdown that can select repair. If fails try the commandline and repair option, in some cases USE_FRM works better.
  3. You ever notice popups and ads always seem to work though?
  4. Possibly the other indexes created via the script you posted in past. To drop indexes...In phpmyadmin click the structure tab and scroll below, click the x on any no longer want.
  5. Change the users mid in the following url. Can get the mid from hovering a users name, is in the url for profile page. Me: http://forums.phpfreaks.com/index.php?app=core&module=search&do=user_activity&search_app=forums&mid=101319&sid=3713a05141dd04fe9e415b769bccc6c6&search_app_filters[forums][searchInKey]=&userMode=content You: http://forums.phpfreaks.com/index.php?app=core&module=search&do=user_activity&search_app=forums&mid=179806&sid=3713a05141dd04fe9e415b769bccc6c6&search_app_filters[forums][searchInKey]=&userMode=content Jacques: http://forums.phpfreaks.com/index.php?app=core&module=search&do=user_activity&search_app=forums&mid=167590&sid=3713a05141dd04fe9e415b769bccc6c6&search_app_filters[forums][searchInKey]=&userMode=content EDIT: The "find content" is easier
  6. If have to create and remove tables and indexes should look into database normalization Create the index once and it keeps updating to the current data.
  7. Furthermore with your script mysql_* functions are deprecated, suggest using pdo with prepared statements. Using unescaped values directly into a query could lead you to an sql attack. Check if post names are actually set and not merely the form was submitted. Those post values are not blank, data type you expect before using them. EDIT: At a minimum use the mysql_real_escape_string() function $from = mysql_real_escape_string($_POST['from']); $to = mysql_real_escape_string($_POST['to']);
  8. Could be php script is timing out. Can set the timeout limit in php.ini: max_execution_time = 600 .htaccess: php_value max_execution_time 600 top of the script: ini_set('max_execution_time',600);//in seconds,10 minutes Can set to 0 for unlimited if want to see if completes or a special circumstance you want to ensure continues. I suggest not setting to 0 entire server. This doesn't make much sense.... You don't create an array but then add to it in the loop with [], The $rows array will always have data you hard coded. Lower you are checking for a variable is not blank. Try this. <?php ini_set('max_execution_time',600); //in seconds function getbetween($string, $from, $to) { $content = explode($from, $string); //print_r($content); $seccontent = explode($to, $content[1]); return $seccontent[0]; } if (isset($_POST['submit'])) { $rows = array(); //define empty array $from = $_POST['from']; $to = $_POST['to']; $query = "select ticker, date_dt, open, high, low, close, wap, os_shares, ttq, total_trades, del_qty, sales, profit, op_assets from `stock_history` where date_t<='$to' and date_t>='$from'"; $sql = mysql_query($query); if (mysql_num_rows($sql) > 0) { //first array record created only if data returned from query $rows = array( "ticker", "date_dt", "open", "high", "low", "close", "wap", "os_shares", "ttq", "total_trades", "del_qty", "sales", "profit", "op_assets" ); while ($list = mysql_fetch_assoc($sql)) { $rows[] = $list; //add additional records to array } } if (!empty($rows)) { //check not empty array, now should only do if is actual data from query $file = fopen("stock_history.csv", "w"); foreach ($rows as $row) { fputcsv($file, $row); } fclose($file); echo '<a href="stock_history.csv" download>download</a>'; } } ?>
  9. I may as well mention http_build_query() to properly build the query string.
  10. I'm not sure what your redirect function does. If you use header(), do an exit; after so the rest of code does not continue. Seems to me it's doing this rule constantly and passing empty p parameters. Here is... $page_url_rewrite = substr(rawurldecode($_SERVER['REQUEST_URI']),1); $_SERVER['REQUEST_URI'] will hold the full request path including the query string redirect($config['server_protocol'].$config['server_name'].'/?p='.$page_url_rewrite); Going by your rules will add the p parameter and then also any directory plus additional query string $page_url = request_var('p', ''); //what is request_var() function doing? $page_url is defined as being set and blank, why add this if not using it? The $_GET or $_REQUEST array contains the parameters and values current in the url.
  11. Honestly the vanilla wordpress versions are not something want piles to be managing across your server. Can enable the wordpress multisites and have an enormous amount of more control with some very important additional plugins. When talking "professional hosting"...something like a virtualization manager using KVM, OpenVZ, Xen or VMWare. Hosting virtual OS, virtual dedicated servers, virtual private servers. Account management, help tickets and support, cpu, memory, bandwidth, storage limitations. Client picks an OS, installs own server or turnkey package Client can only have access their own containers Waaaay back I hosted using hypervm and kloxo. Required centos. Was never an easy thing to do then or even now, be prepared to get schooled with all this. Hard to find the perfect for everything and flaw free solution.
  12. Will be blunt, it may be beyond your ability? Am not trying to be rude, just realistic about this. It's not a simple or small application. Get someone who knows what are doing and save yourself an enormous amount of time. You have an error_log file, try there first Move onto any other error logs...for example the log files for the server stored in apache and mysql folders. Windows or Linux based server? Locations for these will vary depending the operating system and then even some distro's. Follow along what has in this link, will give you some information will need about your configuration. http://php.net/manual/en/function.phpinfo.php Make a file and paste this code within. Name this phpinfo.php and visit this new script in the url. Trying to run in a local server? http://localhost/phpinfo.php Have a qualified server online? http://yourdomain.com/phpinfo.php <?php phpinfo();?> Some information how you managed to have this? Was there ever a time was error free and worked? Made specific for you? Found on the roadside like an abandoned puppy and kept it? All of a sudden not working? Server updates or new host then stopped working? Would be so many questions... If felt like opening some files in an editor to make some changes like a new domain or file locations for the application...try notepad plus If you have error reporting enabled and had any specific errors feel free to post here as that could help narrow down issues. If you post a huge error log file some may not sift through it. Again..just going by how you asked the question...should probably hire someone that does this. We have a wonderful for hire jobs section .
  13. Single = to assign, double == to compare if equal, triple === to compare if equal and also same type http://php.net/manual/en/language.operators.comparison.php
  14. You would build a form and then to make easier use phpmailer to send the email.
  15. You are dealing with a large amount of data. I would first ensure you have the tables properly indexed. http://dev.mysql.com/doc/refman/5.7/en/create-index.html
×
×
  • 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.