Jump to content

redcrusher

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by redcrusher

  1. Thank you very much! that cleared a LOT up for me
  2. So let me get this right: IF $str = "he \ she is 'cool' ! "; //insert mysql_real_escape_string($srt); when i get it back it will be "he \ she is 'cool' ! " If so i think i just asked a question that is not that hard to fix and i apologize for wasting your time
  3. hum... The problem is that i will be running this on a 3.4 server and a 5.0 server ... so i can not use PDO... although that looks amazing! as for "There shouldn't be any slashes in the data in the database table anyhow." am i wrong (i very well could be), but is this not how it works? $str = "you \\ me are \'cool\'"; $str = mysql_real_escape_string($str) //Insert into table THEN //Get from table the string would come back as "you \\ me are \'cool\'" or would it come back as "you \ me are 'cool'"?
  4. So, I think you have all heard the news. THEY ARE GONE! Unfortunately, I do have some old code that I do not feel like going line by line and updating. I was wounding if you guys could help me out. I was hoping that there would be a way to set a define of some sort then when I grab something out of an SQL table it will automatically takeout the "\" (Slashes) and when I insert something into the database it will add the slashes... YES I know and have read the statement written by the php group [http://www.php.net/manual/en/securit...uotes.why.php] But i do not particularly want to go through my code and change everything by hand. If you have any idea, or would like me to explain it another way, please post. Any help will be greatly appreciated. --redcrusher
  5. when errors are displaying: Fatal error: Call to undefined function sqlite_libversion() in /var/www/vhosts/mtgproxydeckbuilder.com/subdomains/alpha/httpdocs/test.php on line 8 [/doce] and [code] Fatal error: Class 'SQLite3' not found in /var/www/vhosts/mtgproxydeckbuilder.com/subdomains/alpha/httpdocs/test.php on line 10
  6. error_reporting(E_ALL); echo sqlite_libversion(); ect... This works just like before. nothing shows up ... as for sqlite ... if i do phpinfo() i get: pdo_sqlite PDO Driver for SQLite 3.x enabled PECL Module version 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 12:50:12 sniper Exp $ SQLite Library 3.3.6
  7. [~]$ yum list | grep -i sqlite python-sqlite.i386 1.1.7-1.2.1 installed sqlite.i386 3.3.6-5 installed mono-data-sqlite.i386 1.2.4-2.el5.centos extras pdns-backend-sqlite.i386 2.9.21-4.el5.centos extras qt4-sqlite.i386 4.2.1-1 base sqlite-devel.i386 3.3.6-5 base
  8. ok so, IF i use: echo phpinfo(); echo phpversion(); It works. But if i use: echo sqlite_libversion(); if does not work and nothing under it works either. On that path, $db = "database/mtg.db3"; // open database file $handle = sqlite_open($db) or die("Could not open database"); // generate query string $query = "SELECT * FROM cards"; // execute query $result = sqlite_query($handle, $query) or die("Error in query: ".sqlite_error_string(sqlite_last_error($handle))); // if rows exist if (sqlite_num_rows($result) > 0) { // get each row as an array // print values echo "<table cellpadding=10 border=1>"; while($row = sqlite_fetch_array($result)) { echo "<tr>"; echo "<td>".$row[0]."</td>"; echo "<td>".$row[1]."</td>"; echo "<td>".$row[2]."</td>"; echo "</tr>"; } echo "</table>"; } // all done // close database file sqlite_close($handle); This does not output anything.
  9. When i get onto a new server, i put a php file on it and see what versions of php sqlite and mysql there are. For some reason, when i put it on this server, it does not show anything ... 2 of the lines: echo sqlite_libversion(); echo phpversion(); Other php commands work and i am able to call simple methods and what not. But for some reason those commands and a sqlite query is not working . Any ideas?
×
×
  • 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.