0
votes
1answer
34 views

Trying to use query variable and form data to change tables in database

So as said in title I'm trying to use the query variable given from the page which directs to this one and the form data from THIS page to manipulate the database. I can't seem to get it right and I ...
2
votes
2answers
19 views

mysql query with case using result as a variable

I need a query like following that doen not work: SELECT *, CASE WHEN x_sutun1 = '1' OR x_sutun2 >= CURRENT_DATE() THEN 0 WHEN x_sutun1 < 1 AND x_sutun2 < CURRENT_DATE() THEN 1 END ...
-3
votes
1answer
46 views

PHP Query Variable advance code to change the query [closed]

For example : I have a table name "TEST" and then the value name | attribute | A | B | A | C | A | D | if use php $query = "select * from TEST"; and then i ...
4
votes
6answers
66 views

BASH - How to read file contents to insert results into mysql WHERE clause

I'm trying to make a file (call it accounts) and have a bash script (call it *name_checker*) loop through each line and make it into multiple strings to store in a variable called '$NAMES' for a mysql ...
1
vote
4answers
66 views

Most Efficient Way to Change PHP Variable in SQL Query?

I have a HTML table that displays a bunch of reporting data from a sql table. Right now the query defaults to the current date, but I'm looking for the most efficient way to change the start/end date ...
-2
votes
8answers
47 views

mysql UPDATE Undefined variable [closed]

Hi guys i have code like this include('db.php'); if (isset($_POST['save']) && $_POST['save'] == '') { if(isset($_POST['misamarti'])){$misamarti = $_POST['misamarti'];} ...
-2
votes
0answers
56 views

MySQL record wont update unless all inputs are filled out on the form [closed]

I've asked this before but none of the answer given worked so I'm asking again hoping to clarify the question. Also I AM WELL AWARE OF THE SQL INJECTION POSSIBILITES WITH THIS! Here is my issue, My ...
-3
votes
2answers
38 views

PHP & MySQL: variable emptying when put inside mysql_query() [closed]

I've been having an awful problem all day today... I have to simply insert a row in the database, and I have tested all variables individually. They all work fine but, as soon as I assemble the query ...
0
votes
2answers
29 views

simplexml_load_file('$variable') - variable url from mysql

I hope comeone could help me out with my problem. I have mysql table where is are columns ID and XMLLink, there is only one row which is UPDATED via html/php/mysql form.. My problem is I need to ...
-2
votes
2answers
47 views

How to get id of array and insert in mysql/php? [closed]

so I'm stumped, but I'm sure it's super easy. I'm trying to check whether a customer record exists, and if it does get the id of the existing one. Here's what I've got so far: $result = ...
0
votes
1answer
20 views

Using variable as integer for AUTO_INCREMENT

I'm rather new to fiddling around in SQL and MySQL, although I stumbled upon this problem. I'm trying to get a number of how many rows are there in one table and set this number onto anothers ...
0
votes
1answer
18 views

Using PDO to insert variables into SELECT clause?

I am attempting to get the distance from a user to each venue stored in a MySQL database, using the spherical law of cosines. The user inputs their location, and the following query is executed. ...
1
vote
3answers
44 views

PHP oops variable passing error

Guys this is a code i have written. I have two files. File one. $regname=$_POST['name']; -----> here the variable passed is john suppose.. $sponserid=$_POST['sname']; ...
0
votes
1answer
56 views

passing php variables between frames

I have a PHP variable inside a frame from a frameset that needs to be passed to two other frames simultaneously. One of those frames refreshes every 5 seconds and will easily grab the variable from ...
3
votes
3answers
62 views

MYSQL: How to define or get LONG string variables

I am running the following query: Variables SET @src = 'Test'; SET @tgt = 'Test2'; SET @db = 'Test'; SET @pk = 'ID, MyPk, etc'; SELECT CONCAT( @pk, GROUP_CONCAT(CONCAT( ", ", COLUMN_NAME) ...

1 2 3 4 5 41
15 30 50 per page