paintbawler1 Posted February 6, 2008 Share Posted February 6, 2008 so here is my "simple" select in code that I want to work with my Oracle DB. <?php session_start(); $userid = trim($_POST['userid']); $logPassword = trim($_POST['password']); require("includes/dbconnect.php"); $query = "SELECT * FROM Users"; $query .= " WHERE UserID='$userid' AND Password='$logPassword'"; $statement = oci_parse($conn, $query); if(oci_execute($statement)) {echo "good execution";} else { echo "no execution";} /*if($row = oci_fetch_assoc($statement)) {$SESSION['userid'] = $row['UserID']; echo "You are a vaild user";} else { echo "You are a invalid user";} */ ?> the bottom part is just commented out for now because I keep getting this error: Warning: oci_execute() [function.oci-execute]: ORA-01722: invalid number in /home/greer/public_html/validate_user.php on line 9 Line 9 being the oci_execute(). I'm not sure what is causing this error. My select statement seems correct and oci_pasre() came back as true. Anybody see what could be causing the problem. I didn't set up this server so am not sure if that is playing a factor. Thanks. Link to comment https://forums.phpfreaks.com/topic/89772-php-oracle-select-statement-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.