How do i prevent php files from being downloaded "illegally" like through the browser. And what are some ways someone can use to download the php files?
...
I'm trying to use Storm to create an ORM to an existing MySQL db. I'm trying to create a table Class for one of the tables but I'm getting this error:
storm.exceptions.ClassInfoError: <class 'statsstorm.Aggframe'> has no primary key information
This table has no primary key, or any combination of columns that produce a unique row. It...
So I have 5 rows like this
userid, col
--------------
1, a
1, b
2, c
2, d
3, e
How would I do query so it will look like this
userid, combined
1, a b
2, c d
3, e
...
So I am trying to do a somewhat complex query and am having trouble. I have structured it like this as it seems to be the most logical:
SELECT (intake.id, s_matters.id, s_calls.cid, s_events.id) AS id,
(intake.name, s_matters.casename, s_calls.name, s_events.subject) AS title
FROM intake, s_matters, s_calls, s_events
WHERE tit...
I'm updating my dad's old website. 99% complete. He has an online learning course that was done using frames and 1500+ images/pages. I created a cookie based login script that uses mysql to track users and the validity of the cookie. On each "protected" page my script appears, the cookie is rewritten with a special "code" and the code is...
I am planning to start a commercial web project (like e.g. facebook) which requires a database.
I've read through all the licenses and FAQ's of MySQL, PostgreSQL and HSQLDB but I am still not certain if I need to purchase a license (commercial type) or have to publish the source code of my web project (open source license) since I am no...
I am creating a site search feature for my e-shop and am using the following code to order my query:
ORDER BY((case when name RLIKE $wholeword then 3 else 0 end) + (case when name RLIKE $partialword then 1 else 0)) DESC
This selects both complete and partial matches from the database and orders them giving complete matches priority ove...
I have a set of data that's organized hierarchically that should be able to grow to an arbitrary size. I need to retrieve the entire tree, but I can't figure out how to do it with just SQL. My current solution is to create a temporary table and use a recursive function to successively query branches of the tree and then store the result ...
I am working with Devart's MyDac and MySQL Server 5.0.41. Here is a section from the documentation on executing stored procedures with TMyConnection.ExecProc:
Note: Stored functions unlike stored procedures return result values that are obtained internally through the RESULT parameter. You will no longer have to provide anonymous va...
Hi All,
I have a table with an ID field of INT Type.
I am doing some data validation and noticed that
SELECT * from mytable where id=94
and
SELECT * from mytable where id='94'
works perfectly, but if I use
SELECT * from mytable where id='94dssdfdfgsdfg2'
it gave me the same result! How is this possible?
...
how do I do multiple updates within same query.
Lets say I have this query
UPDATE table1
SET
Order = 1
WHERE
ID = 1234
But I want to change some more orders where IDs are 2345 and 2837 and 8399
how would I do that within same mysql query. Please notice that Order may be different than 1 for those. as order field is unique.
...
I need a proper way to write a simple WHERE, AND, OR statement. This one doesn't work:
SELECT `content`
FROM `bx_wall_events`
WHERE `type` = 'wall_common_text'
OR `type` = 'wall_common_fb'
OR `type`= 'wall_common_tw'
AND `owner_id`='{$iId}'
ORDER BY `date` DESC
LIMIT 1
...
Hi,
I have a table with 8 millions records in mysql.
I want to keep last one week data and delete the rest, i can take a dump and recreate the table in another schema.
I am struggling to get the queries right, please share your views and best approaches to do this.Best way to delete so that it will not affect other tables in the produc...
Hi, I have two tables: data and comments
data:
-------------------
id | name | email |
pics:
-------------------
msg_id | pic |
The data is assosiated by id and msg_id. How I can merge this two tables into final one?
Edit: some rows in data don't have associated a pic, and i need to keep them.
...
Hi,
truncate ->this resets the entire table, is there a way via truncate to reset particular records/check conditions.
For ex: i want to reset all the data and keep last 30 days inside the table.
Thanks.
...
I am creating a website for products. I am wondering: is it better to use a single dynamic page using PHP, or generate an HTML page for every product, updating the pages from a php template file in a cron job? Most of the material on the page (eg. basic product information) will not change over time , but other parts of the page will be ...
Hi,
I need to use some sopping cart for selling "Scripts" online.
Is there any simple and clean php/mysql shopping cart integrated with paypal that can be used free.
Feature that I require is, a link will be dynamically generated for certain days and sent it to the user who paid so that they can instantly download the script as soon as...
Hello,
In a comment system, I am using variables called $comment and $submittor. I am using a MySQL table called "login" that contains fields called "username" and "email."
The field "email" is an email address.
I would like to send an email with $comment in it to the "email" where "username" = "$submittor."
Here is what I have so f...
Query:
;WITH SuperSelect AS (
SELECT DISTINCT
DropshipPackinglist.CaseNumber AS 'CASE NO.',
DropshipPackinglist.Quantity AS 'QTY'
FROM DropshipPackinglist
JOIN HuaweiDescription ON DropshipPackinglist.ItemNumber = HuaweiDescription.ItemNumber
WHERE (DropshipPackinglist.BatchCode ='0003721008190AHWA01KG'))
SELE...
Hi,
Hope you are fine. My question :
In MYSQL i have a table with this type of field
Field Name: TAGS
Value : xavier,celine,marise,leon,john,cathy,polux,maurice
In PHP i do this
$xwords = array();
function array_rpush(&$arr, $item)
{
$arr = array_pad($arr, -(count($arr) + 1), $item);
}
$tags = requete("SELECT tags FROM tbl_tag...