Linked Questions
11 questions linked to/from How to bind SQL variables in PHP?
32
votes
4
answers
27k
views
PHP PDO::bindParam() data types.. how does it work?
I'm wondering what the declaration of the data type in bindParam() (or bindValue()) is used for...
I mean, I thought that if I define an integer argument (PDO::PARAM_INT), the argument must be ...
39
votes
1
answer
49k
views
PHP PDO prepared statements
I was told today that I should really be using PDO and prepared statements in my application. Whilst I understand the benefits, I am struggling to understand how I implement them into my workflow. ...
0
votes
3
answers
9k
views
inserting/reading blob data from php
I am using the following scripts to test inserting and then reading blob data.
insertion script:
include('session.php');
$provider =$_POST['provider_id'];
$trd_period =$_POST['...
0
votes
3
answers
926
views
Using simple and double quotes in an sql query
I have some issue with a sql query using quotes with variables. (In general I use "bind" so I don't have this kind of problem). Here's the query :
$myquery = mysql_query("SELECT * FROM mytable ORDER ...
0
votes
1
answer
777
views
Javascript pass title attribute through function
I have a function that gets the value of a select menu and this work great. But i am trying to add another value to the function. So I thought I would use the title attribute for option (please see ...
0
votes
6
answers
739
views
Mysql Select Where Not Exists
I have the following tables:
table name:: student
studentid studentname
1001 Charlie Sheen
1002 John Cryer
table name:: studentpayment1
paymentid studentid fee_month ...
0
votes
2
answers
661
views
How to ignore Unidentified index? php mysql [duplicate]
I have unidentified index errors, and sometimes i need it to really be blank.
for example this one. I need this one to be blank because there is already an else statement.
the $_GET is only when ...
0
votes
1
answer
526
views
Get the hidden input of radio button
I have a radio button that fetch and display from database using a foreach loop which is holding a string value. I set another hidden input along with the radio button which is holding the id of each ...
0
votes
0
answers
192
views
How to bind variables while connecting to MySQL database?
<?php
$servername = 'localhost';
$username = 'root';
$password = '';
$dbname = 'testdb1';
$conn = new PDO('mysql:host='.$servername.';dbname='.$dbname, $username, $password);
...
0
votes
0
answers
139
views
Entered data from WEB are not recorded into DB
Can somebody please help me to figure out why all new logins are not recorded into DB?
I have such environment:
MariaDB:
MariaDB [(none)]> select * from db.table;
| id | password1 | password2 |
...
0
votes
2
answers
55
views
if clauses will not work as wanted
So I have a forum where a user has several characters they can post with.
Now on the Edit post page I want to have the character that posted the post selected in the select menu.
If the post have ...