Hello
I'd like to replace a string in every column and every table of a specific database. Is there a way to do this ?
Thanks in advance :)
Edit: That is because I have spotted Gibberish at some locations and it will take me days to fix it one by one
...
I've got a table containing many rows. The rows are guaranteed to have been inserted in order of a column called created_on, which is a datetime column. If a given row has a created_on time within 5 seconds of an existing row, I'd like to delete the given row.
How would I write a query to delete those rows?
...
I'm trying to display a datetime from my MySQL database as an iso 8601 formated string with PHP but it's coming out wrong.
17 Oct 2008 is coming out as: 1969-12-31T18:33:28-06:00 which is clearly not correct (the year should be 2008 not 1969)
This is the code I'm using:
<?= date("c", $post[3]) ?>
$post[3] is the datetime (CURRENT_TI...
I have a small application in which i have 9 different forms, and every form have a least 40+ fields where the user must enter some data.
I have written each form in a single php file and made a master PHP file where i only add the form in the middle of the page.
My question is:
I don't want to write 9 different function for each form...
I need to log all post and get requests on web site in the database.
There will be two tables:
requests with time stamp, user id and requested URI
request parameters with name, value and request id
I will use it only for analytical reports once per month. No regular usage of this data.
I have about one million requests a day and th...
While Windows releases of MySQL administration and profiling tools seem to be a dime a dozen, I'm having a very hard time finding very many designed for Linux.
Note that I'm not looking for monitoring software ala Nagios/Munin here. This would be something more along the lines of a SQLYog.
While I could write some basic scripts to han...
Are there any ways to import data in databases such as MS SQL, MySQL into in-memory databases like HSQLDB, H2 etc ?
...
Hello everyone!
I have quite a problem concerning the use of relational database concepts in Delphi 2009 with MyDAC.
I have a database structure that looks somehow like the following:
Item
id
name
Storage
id
name
StorageItem
id
item_id
storage_id
place
Now when I have an active dataset from "Item" how can I disp...
In diagnosing SQL query problems, it would sometimes be useful to be able to see the query string after parameters are interpolated into it, using MySQLdb's safe interpolation.
Is there a way to get that information from either a MySQL exception object or from the connection object itself?
...
Hi guys,
I have a model Post which has a expiry_date. I want to know what is the
best way to manage scalability in this case. 2 options:
Whenever I want to SELECT from the table, I need to include where
expiry_date > NOW. If the table Post grows like a monster, I will be in
trouble. Imagine after 3 years or more. Indexes will be huge ...
I'm used to using the command "mysql_insert_id()" in PHP to return the id of the last line inserted into my database.
Is there an equivalent command in SQLite in C#?
Thanks!
-Adeena
...
if i have a query like this
$query = mysql_query("
SELECT * FROM tbl_school
INNER JOIN tbl_livingexp ON (tbl_school.schoolname=tbl_livingexp.schoolname)
INNER JOIN tbl_tuition ON (tbl_school.schoolname=tbl_tuition.schoolname)
INNER JOIN tbl_apprequirments ON
(tbl_school.schoolname=tbl_apprequirments.schoolname)
where tbl_school.school...
I have a very simple PHP form, which shows a checkbox, and will store if it is checked or not in a database. This works for the initial inserting, but not for updating. I have tested cases where $saleid equals $pk and it does not enter the if branch to update...why?
<?php
error_reporting(E_ALL);
if (isset($_GET["cmd"]))
$cmd = $_GET[...
I've been beating my brains in over this and I'm making no progress. I'm not very good with SQL so I'm hoping the answer is something simple that I just don't know.
I have 2 tables: One called "images" that contains the data I want, organized with a primary key "imageID". The other is called "productPhotos", and it contains two fields (...
Im looking to expand on the knowledge I already have. Whats a good book to do that?
...
Hi, how do I get the fields of a column that's without a match in another column?
I tried:
SELECT table1.page_title
FROM table1, table2
WHERE table1.page_title != table2.page_title
It produces a lot of duplicate fields so I did a:
SELECT DISTINCT table1.page_title
FROM table1, table2
WHERE table1.page_title != table2.page_title
...
Hi, how do I import a MySQL dump file to a database without overwriting records with the same value?
...
I am looking to create a SQL query that collects the results from multiple queries.
I would like to apply a random sort order and return a limited number of the records.
The queries will all return the same field ("RefCode" in this example), but will have different FROM and WHERE statements.
See an example below of some possible queri...
I am trying to code a function which creates a dropdown of school names selected from a database. It is doing fine creating a dropdown but it is not putting anything in the dropdown. Here is the code:
function schoolDD($name, $selected){
$select = '';
if( $selected != null )
{
$select = $selected;
}
$qry = "selec...
I have the following PHP form, which posts back to a mysql database. My problem is that the update query seems to work, but is always overwritten with "checked". What I want to do is check is get the current value from the database, and then if there is a value in post, get that instead. Now...why is this not working? Do I need to have a...