Unlimited Shared hosting & Unlimited Disk Space from $5.95 - Dreamhost
Solid Managed VPS with 4 IP's from $60 - Liquid Web
Lightning Fast Dedicated Servers & 1GB RAM from $149 - Liquid Web
#1 Domain Registration with WHOIS Privacy - Just $9.95
The Dreamhost web hosting thread below was started by greenman on 2009-02-19 03:12:00:
Post Reply? mySQL Version: 5.0.32 PHP Version: 5.2.6 I have a query using standard Dreamweaver CS3 conventions thus: <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = “”, $theNotDefinedValue = “”) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists(”mysql_real_escape_string”) ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case “text”: $theValue = ($theValue != “”) ? “‘” . $theValue . “‘” : “NULL”; break; case “long”: case “int”: $theValue = ($theValue != “”) ? intval($theValue) : “NULL”; break; case “double”: $theValue = ($theValue != “”) ? “‘” . doubleval($theValue) . “‘” : “NULL”; break; case “date”: $theValue = ($theValue != “”) ? “‘” . $theValue . “‘” : “NULL”; break; case “defined”: $theValue = ($theValue != “”) ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $colname_dlAttempts = “-1″; if (isset($_GET['vid'])) { $colname_dlAttempts = $_GET['vid']; } mysql_select_db($database_dlm, $dlm); $query_dlAttempts = sprintf(”SELECT * FROM dl_attempts WHERE validationID = %s”, GetSQLValueString($colname_dlAttempts, “text”)); $dlAttempts = mysql_query($query_dlAttempts, $dlm) or die(mysql_error()); $row_dlAttempts = mysql_fetch_assoc($dlAttempts); $totalRows_dlAttempts = mysql_num_rows($dlAttempts); ?> This is what the $query_dlAttempts echoes. It finds the query item when I use phpMyAdmin. SELECT * FROM dl_attempts WHERE validationID = ‘b4d5f384fbd59cc114b4b749e8d6cfdc’ But I get this when I try to use it from my application I get this: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘b4d5f384fbd59cc114b4b749e8d6cfdc”’ at line 1 Of significance are the two extra single quotes after the validationID. ‘b4d5f384fbd59cc114b4b749e8d6cfdc”’<—- (two extra single quotes???) I’m out of ideas. Any help is greatly appreciated.
Join in on the original post at the Dreamhost Forum, Apply for a Dreamhost Account or view our Dream Host Review.
Related Web Host Reviews
All Hosts
- 1&1
- A Small Orange
- Aplus
- Bluehost
- BurstNET
- CalPOP
- CariNet
- CheapVPS
- DailyRazor
- Dreamhost
- DynDNS
- Eapps
- EasyCGI
- Eleven2
- Elief
- Engine Yard
- Exmasters
- Fastservers
- Fat Cow
- Fluid
- Fused Network
- Future Hosting
- Geek Storage
- Globat
- GoDaddy
- GoGrid
- Good Avocado
- HiVelocity
- HostDime
- Hostgator
- HostICan
- Hostmonster
- HostV
- HostWay
- ICDSoft
- InMotion
- iWeb
- IX
- Joyent
- JustHost
- KnownHost
- Laughing Squid
- Layered Tech
- Limestone Networks
- LiquidWeb
- Litespeed
- LunarPages
- Media Temple
- Micfo
- MidPhase
- Mosso
- Myriad Network
- NetDepot
- Netfirms
- Peer1
- ProVPS
- Rackspace
- Razorservers
- ResellerZoom
- Right Scale
- SeeksAdmin
- Servage
- ServerBeach
- ServerPronto
- ServINT
- SilverRack
- Singlehop
- SiteGround
- Slhost
- Slicehost
- Softlayer
- SolarVPS
- Steadfast Networks
- TekTonic
- The Planet
- TheNYNoc
- Thinkhost
- Ultra Hosting
- Ultra Website Hosting
- Umbra Hosting
- URLJet
- Velcom
- VolumeDrive
- Voxtreme
- VPSLand
- WebHostingPad
- WiredTree
- WireNine
- XLHost
- Yahoo
- Yourserving

