Advertisement

PHP help?

Started by March 24, 2009 11:03 AM
2 comments, last by phresnel 15 years, 7 months ago
So I have issues on one computer creating a PDO object. I had posted this problem in the Web Programming forums. I still haven't found a solution to this problem, but I do have the PDO 'working' on another computer (with the EXACT same setup??). But now when I try to execute a query i get this error: The instruction at "0x0132250a" referenced memory at "0x00000000". The memory could not be "read". Here is the code:


$sql = "SELECT $fieldstr FROM $table";
$resultSet = $cx->query($sql);

The second line is causing the problem, when it is commented out I do not get the error. I am using MySql and Apache. I am able to connect and run my same query from the command prompt but within the program it can not run?? Any help at all would be sooo appreciated!
The first step is to determine your exact versions of all software involved (Apache, PHP, MySQL and PDO), and make sure that they are the most recent versions you could conceivably have access to. If you do have the most recent, try reverting to stable versions. If neither works, look for online reports of the same bug on the PDO and PHP forums and bug trackers.

The next step is to construct a complete minimal example: one that causes the error, but could not be shortened further without eliminating it. It will probably be only a few lines long. Post that example on the PDO and PHP forums or bug trackers along with a complete description of the problem.
Advertisement
Long shot but shouldnt the instruction terminate with a semicolon
Quote: Original post by CProgrammer
Long shot but shouldnt the instruction terminate with a semicolon


In case you mean the SQL statement, no, MySQL uses semicola to seperate statements, not to terminate them (so it uses "Pascal-Semicola", not "C-Semicola").

This topic is closed to new replies.

Advertisement