|
Hi,
I am trying to get an INOUT parameter from MySQl using PHP and PDO but getting:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1414 OUT or INOUT argument 2 for routine xoompage.sp_send_password_reset is not a variable or NEW pseudo-variable in BEFORE trigger' in C:\xampp\htdocs\xoompage\password_reset.php:17 Stack trace: #0 C:\xampp\htdocs\xoompage\password_reset.php(17): PDOStatement->execute() #1 {main} thrown in C:\xampp\htdocs\xoompage\password_reset.php on line 17
here is MySQL sp:
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_send_password_reset`(IN param_member_guid varchar(255), INOUT param_password_reset_guid varchar(255))
BEGIN
DECLARE param_password_reset_guid varchar(255);
SET param_password_reset_guid = UUID();
UPDATE members SET password_reset_guid = param_password_reset_guid, password_reset_date = DATE(NOW()) WHERE member_guid = param_member_guid;
END
and this is the PHP:
$mysql_query = $mysql_connection->prepare("CALL sp_send_password_reset(:param_member_guid, :param_password_reset_guid)");
$mysql_query->bindParam(':param_member_guid', $_SESSION["member_guid"], PDO::PARAM_STR);
$mysql_query->bindParam(':param_password_reset_guid', $password_reset_guid, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000);
$mysql_query->execute();
Technology News @ www.JassimRahma.com
|
|
|
|
|
I am new to MVC4. I am trying to issue ajax call on the button click to receive partial view with the loaded dropdown list. It looks like Ajax call never reaches controller's method GetMyList(). What is wrong with my code ? Thank you
//in mypage.cshtml
@model IEnumerable<MyProject.Models.MyModel>
@{
ViewBag.Title = "MyPage";
Layout = "~/Views/Shared/_MyLayout.cshtml";
}
<div>
....
<div>
<button id="btnGetList">Find</button>
</div>
<div id="divWithPartialView">
@Html.Partial("_MyPartialView", Model) // displayed on initial page load
</div>
...
</div>
@section MySection{
<script type="text/javascript">
$('#btnGetList').on('click', function (event) {
alert("go get list"); // shows up
var myName = "Jo";
$.ajax({
type: "POST",
url: "Main/GetMyList",
data: myName,
success: function (data) {
alert("list is here"); //does Not show up
$("#divWithPartialView").html(data);
}
});
alert("after ajax"); //shows up
})
</script>
}
// Controller
namespace MyProject.Controllers
{
public class MainController: Controller
{
............
[HttpGet]
public ActionResult MyPage()
{
List<MyModel> myList = new List<MyModel>();
return View(myList);
}
public ActionResult GetMyList(string myName)
{
MyModel mm = new MyModel();
List<MyModel> myList = mm.GetNames(myName); // using search criteria entered on the previous Application page
return PartialView("_MyPartialView", myList);
}
}
}
//Partial View: _MyPartialView.cshtml
@model IEnumerable<MyProject.Models.MyModel>
<label>Select your name:</label>
<select id="lstNames">
<option value="0">- select name -</option>
@foreach (var name in Model)
{
<option value="@name.id">@name.myName</option>
}
</select>
//Model
public class MyModel
{
public int id { get; private set; }
public string myName { get; set; }
public List<MyModel> GetNames(string myName)
{
List<MyModel> myList = new List<MyModel>();
//code to find names that start with "Jo"
return myList;
}
}
|
|
|
|
|
|
Hi,
I want to ask how can I set the following in PHP with the current date to expire the page immediatelly?
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hi,
I am using the following code to read the session variable and set it as value for input textbox:
value="<?php if ($_SESSION["activation_email"] != NULL) echo $_SESSION["activation_email"]; ?>"
it was set in another code like this:
$_SESSION["activation_email"] = $member_email;
but I am getting the following error inside the textbox:
<br />Notice: Undefined index: activation_email in C:\xampp\htdocs\xoompage\activation.php on line 21<br />
just a note that the above error is NOT shown every time... it's just sometimes but I am not sure why?
Technology News @ www.JassimRahma.com
|
|
|
|
|
The error message said that it could not find a session variable with index as 'activation_email', i.e $_SESSION['activation_email'], suspect typo in those pages that show error.
|
|
|
|
|
Hi,
I am getting problem in rebind radgrid on radwindow close because i have to rebind 3 grid on parent page. It is rebinding just last grid which i have mentioned in code.
Following code i have used in my code
///------ In radwindow javascript code -------
function clientClose(arg) {
getRadWindow().close(arg);
var oWin = getRadWindow();
var parentWindow = oWin.BrowserWindow;
// top.location.href = top.location.href;
parentWindow.refreshGrid();
}
/// ---------In parent page javascirpt code -----
function refreshGrid() {
var masterTable1 = $find("<%=rgDefinition.ClientID%>").get_masterTableView();
var masterTable2 = $find("<%=rgDevelopment.ClientID%>").get_masterTableView();
var masterTable3 = $find("<%=rgTesting.ClientID%>").get_masterTableView();
masterTable1.rebind();
masterTable2.rebind();
masterTable3.rebind();
}
Problem is that ---- this code rebinding my last grid means masterTable3.rebind(); because it is in the last of code.
|
|
|
|
|
|
Hello Everyone,
I want to create a website like https://www.pdftoword.com/ or http://www.clipconverter.cc/ using PHP.
For this purpose, what should i do?
for ex:
1> Do i need to create a software and install that on server to convert a file? Then after uploading that file to server and then by using that software for conversion and giving it back to user using link?
If 1 is correct,Then do i need to buy my own server for this purpose or hosting companies give this option to install software ?
If you can, Please give a useful link regarding this topic.
I want to know the procedure for creating these kind of services.
Thank you
Money
|
|
|
|
|
Moneyzz Sharma wrote: Do i need to create a software and install that on server to convert a file? Yes, if you want to provide the service on the internet then you must use a web server. You could buy your own, but it is usually far easier to buy space from a hosting company. To learn PHP go to http://www.w3schools.com/php/[^].
Veni, vidi, abiit domum
|
|
|
|
|
Thing is not PHP. I want ask about the software that i need for conversion. Will the hosting provide me a option to install the software at the server?
I was not able to find a single tutorial on this on web
|
|
|
|
|
Moneyzz Sharma wrote: Thing is not PHP
Your original question stated:
Quote: I want to create a website like https://www.pdftoword.com/ or http://www.clipconverter.cc/ using PHP.
Sp maybe you should explain your problem in clearer detail.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
I have a 3 step survey, from where in on each step we are collecting some values.
Each step is created as a panel, and set visible to false, enabling them in the code as required.
On Step 3, there are about 5 questions the user needs to complete, upon which an account is created. So, on the button click of this final step, for some reason all the values in this panel are lost when i try to get the values,
CheckBoxList chkbxChk = (CheckBoxList)pnlQuestions.FindControl("cbl_" + qa.questionid);
It appears as though on button click does not remember the values from panel?
any ideas?
Thanks!
|
|
|
|
|
Hi,
in PHP, how can I check if the QueryString $_GER
1. Exists in the url.
2. Exists with value
3. Exists without value
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
|
This article may help: http://www.codeproject.com/Tips/677867/Code-Experiment-on-_GET
|
|
|
|
|
if the url has "http://www.example.com/index.php?solution=solved"
You can check:
if(isset($_GET['solution']))
echo 'its set And the value of "solution" is: ' . $_GET['solution'];
else
echo 'NOT set! ;
|
|
|
|
|
Hi,
I need to create a graph (a linear graph) in a project of mine.
My company only uses IE8.
I checked over the net and saw that SVG is not supported in IE8 however I'm seeing SVG when I'm surfing in IE8 (when I look in the source ) so I don't understand the contraindication.
Is SVG supported or not and if not, is there a way for me to create a linear graph? I saw an example using CSS but it's too complicated and I wanted to know if there's something simpler.
Thanks
|
|
|
|
|
Regardless of IE version, creating SVG using IT is not an option. I can't imagine what you mean by "IE" in terms of creating anything. "Save As" possibly? But anyway, per SVG, check out:
http://inkscape.org/download/[^]
Tons of fun. Coming your way. SVG away!
|
|
|
|
|
Thank you for the resposne but I didn't get an answer to my question.
I can see the SVG works on IE in different versions.
My question is again regarding IE8.
Using an open source editor is not an option in my situation.
If you look at sites that do use SVG with IE8 compatibality mode it does display them. I want to know how it is done.
I found a JS library that I'm going to check:
http://raphaeljs.com/[^]
I'll update...
Thanks
|
|
|
|
|
Hello ThetaClear,
You posed an interesting question, specially for the fact that you say to me able to see SVG while on IE8.
So after some research what I've found out is that for most case, people are using a PNG as a fallback for users browsing with older browsers. In your case, which is probably more complex, there is an option for a web API called SVGWeb or a replacement with html and JavaScript.
That is what I can tell you without knowing much more about your graph project.
Good Luck
Source:
http://alchemise.net/wordpress/?p=225[^]
http://www.rustybrick.com/svg-support-for-internet-explorer.html[^]
http://css-tricks.com/svg-fallbacks/[^]
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
|
|
|
|
|
Thanks for the answer.
Since Raphael is using VML as a fallback if this IE8 or below I guess that what makes the browser display it.
|
|
|
|
|
No problem,
I'm also learning about it, so it was that much of a stretch from where I'm reading
There are no secrets to success. It is the result of preparation, hard work, and learning from failure. Colin Powell
|
|
|
|
|
Hi Guys,
One of those days when i have to start a new assignment and i feel a little uncertain about which path to go.. CROSSROAD.
I did a decent amount of web application development using Asp.net, from framework 1.1 to 4.0, then moved to Silverlight for nearly 2 years due to my assignments. haven't got a chance to work with MVC so i am kind of MVC virgin. so as to say, i am a Razor engine virgin too.
Now i have an opportunity to work on a Web application (not Silverlight based), and looking at options at hand, I am uncertain what would be a good way to go ahead.
1) should i go with just pure (HTML5 + JavaScript) way while consuming data via services
2) or should i do a HTML5 + Razor engine path, while data is still to be consumed via services.
I am inclined towards option 1, pure HTML5 and JavaScript for development, but should i be too worried about getting into JavaScript horror house? or should i look towards Razor engine to be a more promising one?
Some light please..
|
|
|
|
|
Hi,
I checked on the net and found that decryption sha256 php is not possible.
then how can I implement Password Reminder option?
please advise...
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|