Hi.
I have a textfield variable $string...
It contains for example "BMW COUPE"...
How can i search mysql db field for word matches???
SELECT * FROM db WHERE description xxxxxxxxxxxxxxxxxxx?
description is the field name!
so if description containse either 'BMW' or 'COUPE' it will return this field...
Thanx
...
mysql diplay an error
OperationalError: (1025, "Error on rename of './CMMS/#sql-c40_20a' to './CMMS/member' (errno: 150)")
How to solve it??
Thanks in Advance
...
This is the function that im calling.
function GetSubmissions($coach){
$result = mysql_query("SELECT * FROM `ptable` WHERE coach = '$_SESSION[username]'") or trigger_error(mysql_error());
while($row = mysql_fetch_array($result)){
foreach($row AS $key => $value) { $row[$key] = stripslashes($value); }
$id = $row['id'];...
no border shows up when setting style in the table row below, inside the while loop? why? Background color setting works fine, but not this... NO BORDER SHOWS UP...
// Build Result String
$display_table = "<table>";
while($row = mysql_fetch_array($qry_result)){
$display_table .= "<tr style='border-top-width: thin; border-top-style:...
Background
A html page will ask the user to type their username and password. These are credentials for a MySQL database (i.e. they will be used in JDBC connection so that no password is physically stored in the files).
On submit a servlet will be called which tries to connect to the database. If it can, the credentials are correct and...
I have a birthdate, year, month, day columns where columns "year,month,day" are foreign key to other tables
What I want to do is for each birthdate get id(year(birthdate)) to be the value of year column and the same thing for month and day columns.
How can I do this in MySQL?
Thanks in advance
...
I have this table:
CREATE TABLE `maindb`.`daily_info` (
`di_date` date NOT NULL,
`di_sid` int(10) unsigned NOT NULL default '0',
`di_type` int(10) unsigned NOT NULL default '0',
`di_name` varchar(20) NOT NULL default '',
`di_num` int(10) unsigned NOT NULL default '0',
`di_abt` varchar(1) NOT NULL default 'a',
PRIMARY KEY ...
What are some options to avoid the latency of pointing local django development servers to a remote MySQL database?
If developers use local MySQL databases to avoid the latency, what are some useful tools to sync schema updates of the remote db with the local db and avoid manually creating, downloading, and loading dumps?
Thanks!
...
i've got this query:
SELECT * FROM (
(SELECT ACCOUNTS.INSTALLTIME, ACCOUNTS.HONAME, ACCOUNTS.ADDRESS, ACCOUNTS.CITY, ACCOUNTS.STATE, ACCOUNTS.ZIP, ACCOUNTS.JOBNUMBER, ACCOUNTS.INSTALLDATE, ACCOUNTS.RESULT, ACCOUNTS.NOTES, ACCOUNTS.SMNOTES, technicians.technumber, technicians.boardplacing
FROM ACCOUNTS
INNER JOIN technicians ON ACCOUNT...
I am developing a PHP script for uploading .PDF documents as medium BLOBs into a MySQL database via PHP. The script also allows users to search for files and open/download them but I do not think that part of the script is relevant to my issue. The script works fine with files less than 2 MB but as soon as I try and upload a file that ...
Thanks for checking. All helpful answers/comments are up voted.
I have the following code, which does the job, but imo is not efficient. The reason I think it's not efficient is because I'm using fetchAll + loop even though I know that the query will return either 1 or no records.
//assume the usual new PDO, binding, and execute are up ...
Hi...
I have a form that searches a mysql db for whatever the user is after, and returns the results on the same page in a div (using ajax then php to search mysql)...
The results are ads, as cars for example, and I want each ad to have a unique image associated with it so that it displays the images next to the ads...
Storing images ...
Im using the following function.
function GetSubmissions($coach){
$result = mysql_query("SELECT * FROM `ptable` WHERE coach = '$_SESSION[username]'") or trigger_error(mysql_error());
while($row = mysql_fetch_array($result)){
foreach($row AS $key => $value) { $row[$key] = stripslashes($value); }
$id = $row['id'];
...
Hi..
The user on my site can currently search a mysql db via PHP, and the results are displayed on the same page inside a DIV, thanks to ajax...
What I need now is to display an image that is associated with the mysql results...
Say the result has ID=250, then I want a piece of code to search in a folder for an image with the name 250....
I'm wondering if There is something that I can do to better get keep my process list clean when initiating commands with MySQL. Currently I have been seeing a lot of:
17325 user_a localhost db_1 Sleep 1132 NULL
17464 user_a localhost db_1 Sleep 1124 NULL
17983 user_a localhost db_1 Sleep 1078 NULL
...
Suppose I have many columns. If 2 columns match and are exactly the same, then they are duplicates.
ID | title | link | size | author
Suppose if link and size are similar for 2 rows or more, then those rows are duplicates.
How do I get those duplicates into a list and process them?
...
Hello community,
I'm learning to program with Ruby on Rails and I've reached my hardest task yet. I have two tables, each containing a list of business categories (I.E. Thai Food Restaurant, Plumber, Office Supply Store). These two tables come from two different APIs where I'm essentially acting as the middle-man between them. They list...
Hi,
My question is regarding referential integrity concept in MySQL Database. Due to some kind of restrictions from our DBA we are not allowed to use referential integrity features of MySQL and so my question is "How can we implement Foreign Key concept in MySQL when we do not have referential integrity features in MySQL ?"
Thanks.
...
Everyone knows the "=" sign.
SELECT * FROM mytable WHERE column1 = column2;
However, what if I have different contents in column1 and column2...but they are VERY similar? (maybe off by a space, or have a word that's different).
Is it possible to:
SELECT * FROM mytable WHERE ....column matches column2 with .4523423 "Score"...
I bel...
We have a number of servers running various different LAMP setups. One thing that seems to be different depending on who set the server up is the way PHP is configured. Some are set up to use the Apache DSO module, others are setup to use CGI. Some have suEXEC turned on, other servers its turned off. We are always trying to tweak our app...