Jump to content

Renlok

Members
  • Posts

    258
  • Joined

  • Last visited

About Renlok

  • Birthday 03/18/1990

Contact Methods

  • Website URL
    http://www.we-link.co.uk

Profile Information

  • Gender
    Male
  • Location
    newbury

Renlok's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. For my search function im trying to build a search array but this part is giving my loads of problems I cant get it to work foreach ($payment as $key => &$val){if (!$pri){$ora = "((au.payment LIKE :payment{$val})";$asparams[] = array(":payment{$val}", '%' . $system->cleanvars($val) . '%', PDO::PARAM_STR);}else{$ora .= " OR (au.payment LIKE :payment{$val}) AND ";$asparams[] = array(":payment{$val}", '%' . $system->cleanvars($val) . '%', PDO::PARAM_STR);}$pri = true; } the $ora is just added to the SQL later and the $asparams is the parameter array that is passsed into bindParam later im getting the messasge anyone have any ideas?
  2. I fixed it changed it to $this->pdo = new PDO("mysql:host=$DbHost;dbname=$DbDatabase;charset=$CHARSET", $DbUser, $DbPassword);
  3. I am creating a PDO database handler class, I've never used it before and its very slow going so far it mostly works but i have a problem public function connect($DbHost, $DbUser, $DbPassword, $DbDatabase, $DBPrefix, $CHARSET) { $this->DBPrefix = $DBPrefix; $this->CHARSET = $CHARSET; try { // MySQL with PDO_MYSQL echo "SET NAMES $CHARSET"; $this->pdo = new PDO("mysql:host=$DbHost;dbname=$DbDatabase", $DbUser, $DbPassword, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES $CHARSET")); // set error reporting up $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // actually use prepared statements $this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); } catch(PDOException $e) { $this->error_handler($e->getMessage()); } } doesn't work unless i remove , array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES $CHARSET") and I have no idea why it isn't throwing any errors its just not working
  4. oh nevermind i just forgot the FROM *facepalm* but thanks anyway
  5. yeah it does have a value ive tried that and its not the problem.
  6. in my code i have $query = "DELETE " . $DBPrefix . "bids WHERE auction = " . $Auction['id']; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); but if WHERE auction = " . $Auction['id'] doesnt match anything i returns the error I really dont understand why its returning an error is this just a case of having to add some code to check if theres anything that actualy needs deleting first?
  7. if you view http://www.webidsupport.com/index.php in IE the header will be streched but in any other browser it will look normal. Anyone know how i can fix this?
  8. I've made a script and the .htacces file has the contents # secure htaccess file <Files .htaccess> order allow,deny deny from all </Files> # disable directory browsing Options All -Indexes # disable access to logs/template files <Files ~ "\.(log|tpl)$"> order allow,deny deny from all </files> but on some servers the Options All -Indexes line will cause a 403 error to be thrown when using the install script and ive no idea why? an example or the url that will throw it is http://yoursite.com/install/install.php?step=2&URL=http://yoursite.com/&EMail=sales@yoursite.com&cats=1&n=1 I could really do with some help :-\
  9. well yeah i sort of fix it for IE8 i had given up on all the older IE's but thanks anyway i may try that out when i have time next.
  10. for anyone else to fix it i added <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
  11. but there all errors with urls having & and = in which i cant do anything about and isnt going to make any difference with how it looks in any browser Also if you enable compatability mode in IE site looks fine
  12. the page: http://www.webidsupport.com/ looks fine in every other browser ive tested with but looks awful in IE anyone have any ideas of how to sort it out without messing it up on all other browsers?
  13. OK thanks i finally go it to work with the bccomp() function now i have if (bccomp($bid, $next_bid, 2) == -1)
  14. It shows string(4) "0.29" float(0.29) EDIT: but even if i change it to var_dump(floatval($bid)); echo '<br />'; var_dump($next_bid); if (floatval($bid) < $next_bid) it shows float(0.29) float(0.29) but the if statement still returns as true
  15. i have an if statement if ($bid < $next_bid) and it $bid & $next_bid hold the same values. php seems to think the statement is true. is this a bug in php or something?
×
×
  • 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.