I'm looking for a strategy in as far as stopping the repetitive problem of branching out tables. For example as a fictitious use case, say I have a table with users that contains their name, login, password and other meta data. In this particular scenario, say the user is restricted to login per a specific subset of IP(s). Thus, we have ...
For example, mysql quote table name using
SELECT * FROM `table_name`;
notice the `
Does other database ever use different char to quote their table name
...
Hi,
I got some problems with finding a bug in php/mysql application, and I wonder if I can do something like this: UPDATE table SET userid='2' WHERE userid='1' - > Can I update something I state in WHERE?
...
I am trying to create a search page with MySQL fulltext.
I have a search page with a textbox:
< FORM NAME ="form1" METHOD ="POST" ACTION ="catalog.php?action=">
I pass the user's input to another webpage (catalog.php) which runs the query:
"SELECT * FROM books WHERE MATCH (title) AGAINST (???)"
What do I place in the against() functi...
Hi.
I'm creating a site where the user unfortunately has to provide a regex to be used in a MySQL WHERE clause. And of course I have to validate the user input to prevent SQL injection. The site is made in PHP, and I use the following regex to check my regex:
/^([^\\\\\']|\\\.)*$/
This is double-escaped because of PHP's way of handling...
I'm having to start building the architecture for a database project but i really don't know the differences between the engines.
Anyone can explain whats the pros and bads of each of these three engines? We'll have to choose one of them and the only thing I actualy know about them is this:
Mysql & Postgres:
Are free but not so good ...
When I worked on the Zend Framework's database component, we tried to abstract the functionality of the LIMIT clause supported by MySQL, PostgreSQL, and SQLite. That is, creating a query could be done this way:
$select = $db->select();
$select->from('mytable');
$select->order('somecolumn');
$select->limit(10, 20);
When the database s...
I am attempting to run the following code in phpMyAdmin:
set @tagTokenNum=0;
select @tagTokenNum:=tag_token_id from tag_token where tag_token_name = 'XXX';
delimiter go
if @tagTokenNum is null then
insert into tag_token (tag_token_name) values ('XXX');
select @tagTokenNum:=last_insert_id();
end if;
go
I have also tried this wit...
Hi,
I have data in MySQL. I am sending the user a URL to get their data out as a CSV.
I have the e-mailing of the link, mysql query, etc covered.
How can I, When they click the link, have a pop-up to download a CVS with the record from MYSQL? I have all the info to get the record already I just dont see how to have PHP create the CSV ...
how do i access Mysql from an ASP.NET 2 site in medium trust mode? My ISP wont allow my site to run under full trust and i've tried many(if not all) mysql apis to connect to the db.
All result in either SocketPermission or FileIOPermission errors. i have even tried overriding the trust setting in my web.config.
Any ideas?
...
Does anyone know any visual MySQL diff tools?
I have about 10 machines all with their own instance of MySQL. No replication is taking place, since each machine acts independently of the others. However, their table structures must be identical, and I would like a quick way to verify their table structures.
I'm not so concerned about ...
How can I break SP execution in an Exception like fashion in MySQL?
I need a to break SP execution when an illegal argument is passed so no UPDATE/INSERT is performed.
My teacher actually did it by creating an SP called "raise_error" which did nothing but execute a non extising table. Which I would argue is a WTF...
...
I have been asked to audit any/all changes in a MySQL table. Does anyone know of any tools out there to help me do this or do I need to write my own solution?
If I write my own audting, my initial thought it to make a separate table and build a string of changes in the PHP code. Something like "fieldname1 -> oldvalue | fieldname2 -> old...
I have data from MySQL showing all organisations a customer got, with all details of employess in each organisation. I want to list each organisation name only once i.e. in a single cell ( row span) and all employees in that organisation against this name like:
Org1 Emp1 Name, Emp1 Phone, Emp1 Address
Emp2 Name, Emp2 Phone,...
Hello, I've make an application in php that uses DOMDocument() in php 5.
The problem is that my server uses php4 and DOM object is not recognized. What can I do?
Can I download any kind of software and put it in my server and use include?
wich one?
Thanks a lot.
...
Here is a stripped down version of what I use to authenticate users, it works fine on my php v5.0.2/mysql 4.0.21 server, but fails on my php v5.1.6/mysql v5.0.45 server.
In the code below, should I be aware of anything that might not be supported by the newer version of php & mysql? Global variables have been enabled.
<?php
if(!isset...
I'm working with a client that needs to generate millions of the alphanumeric codes used in magazine scratch-off cards, bottlecap prizes, and so on. They have to be short enough to print on a cap, they want to make sure that ambiguous characters like 1 and I, 0 and O, etc. are not included, and they have to be explicitly stored for futur...
I need to store a url in a MySQL table. What's the best practice for defining a field that will hold a URL with an undetermined length?
...
Is it at all possible to do database-agnostic table dumps/hydrates? I don't have any complicated constraints. I would also settle for db-specific ways, but the more pure jdbc it is the better (I don't want to resort to impdp/expdp).
...
I'am working on a PHP + MySQL Social Networking application, now i need to setup different access control (read,create,edit,delete) for global (all items) and/or self items (item which created by themselves) for each module to group or specific user.
Does anyone has suggestions in doing this (table structures, etc)?
...