If I have a mapping like this:
<class name="Users" table="users">
<id column="id" name="id">
<generator class="native"/>
</id>
...
<set name="types" table="types" cascade="all">
<key column="user_id" />
<element column="type_name" type="string" />
</set>
</class>
How should the user object b...
I have been trying to make a secure login for my site that I am developing.
I just cant get it to work, I use MySQL databases with PHP.
I can make the form to add the user and their info to the database but I can't seem to make it work with the login.
What type of encryption is used with HTML <input type="password">?
How do I keep t...
How to find what are all tables has binary data and display the table name ?
...
Hi,
I noticed my Rails app returns in place of double quotes and certain dashes, it returns a question mark character-- �
Is there a way to update the table and replace them with original characters?
Thanks!
Amie
...
Hello,
I am trying to store IPv6 addresses in MySQL 5.0 in an efficient way. I have read the other questions related to this, such as this one. The author of that question eventually chose for two BIGINT fields. My searches have also turned up another often used mechanism: Using a DECIMAL(39,0) to store the IPv6 address. I have two ques...
I tried to use setBlob() as follows:
class DataBuf : public streambuf
{
public:
DataBuf(char * d, size_t s) {
setg(d, d, d + s);
}
};
char b[20];
DataBuf buffer((char*)b, 20);
istream stream(
PreparedStatement* s = con->PrepareStatement("insert into mytable (mybin) values (?)");
s->setBlob(1,
int rows = s->executeUpdate...
Hi,
I basically have three tables, posts, images and postimages (this simply contains the ids of both the other tables and allows more than one image in each post and each image to be reused in multiple posts if necessary).
I'm trying to list the titles of all the posts, along with a single, small image from each (if one exists)
I can ...
Can anyone explain what the following PHP Code does
function query($query_string)
{
if ($query_string == "") {
return 0;
}
if (!$this->connect()) {
return 0;
};
if ($this->QueryID) {
$this->free_result();
}
if ($this->RecordsPerPage && $this->PageNumber) {
$query_stri...
Hello,
The code below allows my users to add an item ($site) to a table ($find). It works well. But every once in a while, it adds a blank value to the table in addition to the one the value the user adds.
Any ideas why?
Thanks in advance,
John
<?
$find1 = urlencode($find);
print "<div class=\"siteadd\">
<form action=...
I am building a Flash AS3 application that allows users to modify images, and then submit-save them to a server.
The user will then have the ability to log in and access these saved images in a thumbnail gallery. They can either delete an image or click a thumbnail to view it at original size.
I am comfortable with the front end having ...
On a website I run, I let users rate the individual posts (3, 2, 1). I use the following SQL (in MySQL) to get the percentage of votes of each value:
SELECT vote, COUNT(*) * t.factor AS pct
FROM ratings
JOIN (
SELECT 100 / COUNT(*) AS factor
FROM ratings
) AS t
GROUP BY vote
LIMIT 0, 30;
That works fine for calculating the per...
Consider two database tables, Reports and Reports_has_properties
Reports
------
id_report
1
2
3
Reports_has_properties
----------------------
id_report property
1 red
1 big
2 orange
3 blue
3 tiny
Problem: I only get only the reports with the property red, for example, but the query returns all ...
I have a table with weekly data that looks like:
userID Site date
------ ------ ------
Smith Ferris Wheel 2009-07-13
Jones Outerspaceland 2009-07-13
LChar Ferris Wheel 2009-07-14
Smith Underworld 2009-07-16
Jones Fish Bowl 2009-07-17
Munson Go-Go Tech ...
I am interested in XML. I know it from Google's CSE.
It is often a pain for me to manipulate 3000-rows XML files.
This raises a question.
Why does Google use XML, not MySQL, such that I need to manipulate large XML -files?
...
The site I am working with has a somewhat convoluted way with dealing with users and permissions.
These are the user types:
User
Facility Approver
Facility Admin
Corporate Approver
Corporate Admin
Now there are also facilities, and that is where these permission levels come into play. Facilities are linked to users and user levels ...
Hello, i've looking for an IDE for MySQL with intellisense, which would help a lot. Any suggestions? Thanks!
...
Hi,
I have a webapp I'm making that stores user information, and their preferences regarding the app. Is this something worth splitting into two databases? I was thinking one table "users" with fields "id, useridfromFacebook, facebookRealName" (so 1, 52052025295, Alex McP), and then have a table "preferences" with fields "id, useridfro...
I'm working on a project now that will require me to enable users to store negative-dates in the database. These dates have the potential to span many thousands of years BC, and as late as 'Today.' I've worked on many projects that stored dates, but they were all relatively-recent dates, and none of them were ever negative (BC).
What ty...
I am making a cookie based favorite system and need to join data from two tables based on the unique user id stored in the cookie so I can tell what items that use has marked as favorites.
I know I need to do a JOIN but have not used them much and dont really have my head around them yet.
Existing query that selects the items from the ...
I have narrowed down my problem to the mysql_connect call I am doing in PHP.
It produces an error message. What would you suggest I should do to fix the problem with this error:
Error Summary
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
Detailed Er...