Posts

Showing posts from March 9, 2019

Concatenate columns in a query to use 'LIKE' operator

Concatenate columns in a query to use 'LIKE' operator I am creating a search to search by name. In the database I have first name ( fname ) and surname ( lname ). fname lname The search works when you search by either first name or last name but not the full name. e.g Entering 'Joe' or 'Smith' as the value will bring back 'Joe Smith'. Entering 'Joe Smith' as the value will bring back no records. $value = "%".$search_val."%"; $query = "SELECT fname, lname FROM users WHERE (fname LIKE ? OR lname LIKE ?)"; if ($stmt = $conn->prepare($query)) $stmt->bind_param('ss', $value, $value); $stmt->execute(); $stmt->bind_result($fname, $lname); /* fetch values */ while ($stmt->fetch()) printf ("%s %sn <br>", $fname, $lname); /* close statement */ $stmt->close(); /* close connection */ $conn->close(); ?> Is there a way to concatenate fname and lname within the query? O

What is the best time to leave from Baja Mexico to San Diego, California through Vehicle/Pedestrian crossings?

Image
5 What is the absolute best time to leave from Baja Mexico to re-enter San Diego, California by either vehicle or pedestrian? This is assuming you don't have a Sentri Pass. I went to Mexico a few weeks ago and had a terrible time entering the border from Mexico into San Diego. Took me 4 hours by vehicle through San Ysidro Border at 10AM on a Regular Sunday. From my understanding there is about 7 Border crossings of Mexico. Wiki Border crossing of Mexico Is there a list out there that shows the best times to re-enter San Diego Area through vehicle or pedestrian? usa customs-and-immigration borders mexico california share | improve this question asked Jul 7 '16 at 18:19 DanielSD DanielSD 70 1 8 1 Current wait times are available at bwt.cbp.gov – Michael Hampton Jul 7 '16 at 18:44 Thats nice to view real time border crossings, but i was wondering if there was a "Best TIME" to go. From my understand

Web Api giving error: 500 internal server error

Image
0 Scenario: I have an ASP WebAPI service that accept email id to retrieve the previous password. But I am having a problem that If I enter a valid email Id "Internal server error 500" is thrown but if a wrong email Id is entered, then Json with error message is returned. (If an invalid email id is entered, then I have a Json with error message returned) So can please any one guide what to do. var urll = 'api/BeerAppRetrieve'; // var urll = 'api/BeerApp'; var emailId = "anirudh1190@gmail.com"; //$.getJSON(urll + '/' + data) $.getJSON(urll, "emailId": emailId ) .done(function (data) ) .fail(function (jqXHR, textStatus, err) alert("error" + jqXHR.responseText); $('#txtUserName').text('Error: ' + err); ); My json call.. I want the method to be hit if email id is valid also.. Please help... config.Routes.MapHttpRoute( name: "DefaultApi1", routeTemplate: "api/con