This Regular expression if for MySQL query:
I want to exclude this row because it has 'something' in side the bracket
"bla bla bla bla bla bla (bla bla bla something)"
However I want to include this row, because it does not have 'something' inside the bracket
"bla bla bla (bla bla bla)"
I tried this query but it didnt work.
SELECT * ...
Hello,
To short version of this question is that I want to accomplish something along the lines of what's visible on Flickr's homepage once you're logged in. It shows the three latest photos of each of your friends sorted by date but grouped by friend.
Here's a longer explanation: For example I have 3 friends: John, George and Andrea. ...
I have a Joomla site, integrated with virtuemart in it.
have almost 9,000 products.
it is not loading the site when i select a manufacturer from a module, which must list all products. Same problem is in the case of categories(have 2 categories).
error is
FastCGI Error Number: 258 (0x80070102)
when I have only 250 products, it was fas...
Hi,
I have a table say, ITEM, in MySQL that stores data as follows:
ID FEATURES
--------------------
1 AB,CD,EF,XY
2 PQ,AC,A3,B3
3 AB,CDE
4 AB1,BC3
--------------------
As an input, I will get a CSV string, something like "AB,PQ". I want to get the records that contain AB or PQ. I realized that we've to write a MyS...
Referring to SO and other sites have given me examples of how to use MySQL to create a 'greatest-n-per-group' query.
My variant on this would be to have a query that returns the first 3 rows of each category. As the basis for this I need to sort my data into a usable sequence and that is where my problems start. Running just the seque...
What is the best/secure way to backup a mysql database on windows server (2008)? I have "MySQL Administrator" but that requires that you save passwords for backup project. I'm not keen on doing as anyone gaining access to the server would then have easy access to the database. Can you do anything similar to SQL Server like using Windows ...
when i am trying to log on mysql using my ip address i am getting error 1130 qht can i do for this
...
hey guys
i need to show a treeview of my categories , saved in my mysql database .
Database table :
table : cats :
columns: id,name,parent
problem is in php part :
//function to build tree menu from db table test1
function tree_set($index)
{
global $menu;
$q=mysql_query("select * from cats where parent='$index'")...
When i run a mysql select statement, it takes very long because i have already previously deleted a very large number of rows.
Is there a way for the table to start scanning from the bottom, as opposed to from the top?
...
Hi
in mysql how to write a sql like this, to get the amount of X > 20 and <20
select date, numberOfXMoreThan20,numberOfXLessThan20, otherValues
from table
group by (date, X>20 and X<20)
my way, but i think it's not good
select less20.id_date, a,b
from
(select id_date,count(Duree_Attente_Avant_Abandon) as a ...
UPDATE counter_reports
SET `counter`=`counter`+1,`date`=?
WHERE report_id IN(
(SELECT report_id
FROM counter_reports
WHERE report_name="emails_sent" AND `year`=1
ORDER BY report_id DESC LIMIT 1),
(SELECT report_id
FR...
I am working on an Asset Database problem using PHP / MySQL.
In this script I would like to search my assets by an asset id and have it return all related fields.
First I query the database asset table and find the asset's type. Then depending on the type I run 1 of 3 queries.
<?php
//make database connect
mysql_connect("localhost...
is there a way to insert pics(not url,the pic)into a MYSQL table made with phpmyadmin?
and if there is when i want to get that picture and insert it in the page , what should i do? :)
...
Hi all,
The title kinda says it all. I need to generate a report that is roughly 100 columns wide(tools) and many thousands of rows deep (users) having a '1' displayed at each intersection where a user is related to a tool.
Tool1 Tool2 Tool3 Tool4 ...Tooln
user1 1 1
user2 ...
Hi there,
Here's my situation:
- a table with a varchar field in which i store serialized data from php
now I have to add another field to the mysql table in which i store JSON data also from php
As the table already has serialized data stored i was wondering if i can
unserialize > json_encode and store the data in the new db field?...
Folks I am trying to build a sitemap (we need one badly) for a huge multi-page web app. Technically its not much more than a collection of php/MySQL web forms that use javascript instead of traditional linkage to access the many pages.
<td width="100" align="center" ONMOUSEOVER="this.className='bgover'" ONMOUSEOUT="this.className='bgou...
I have two tables, rating:
+-----------+-----------+-------------+----------+
| rating_id | entity_id | rating_code | position |
+-----------+-----------+-------------+----------+
| 1 | 1 | Quality | 0 |
| 2 | 1 | Value | 0 |
| 3 | 1 | Price | 0 |
+----...
I have a massive MySQL database (around 10 GB), and I need to copy it to a different server (slicehost). I don't want to do a DB dump and reimport b/c I think that would take forever. Is it possible to just move the raw SQL files from one machine to the next, setup an identical mysql server, and flip the switch?
...
A bit on my requirements, at the moment i'm passing on a search string from a Cocoa app to a PHP script which queries the database, and then generates an XML output for Cocoa again.
The only bit I am having issues with now is generating the XML output from the db query.
At the moment, i'm trying to loop through the results and output t...
I need a SQL statement to retrieve records where it key (or any column) is in a associate table, for example:
documentId termId
4 1
4 2
3 3
5 1
This:
SELECT documentId
FROM table
WHERE termId IN (1,2,3)
...will retrieve any documentid value where the termid value is 1 or 2 or 3.
...