I'm attempting to use LAST_INSERT_ID on an auto incremented index that has moved past the signed int value 2147483647. This column is an unsigned int. However, LAST_INSERT_ID() is returning an invalid negative value. Researching this, I've found a couple comments indicating this is the nature of this function. But I cannot find it offici...
I'm using MySQL ActiveRecord with CodeIgniter to submit queries, but have run into some snags when using the "select" function. For instance, this MySQL query works perfectly within phpMyAdmin:
SELECT review_id, firms_name
FROM reviews AS r
JOIN firms AS f ON f.firms_id = r.review_target_id
WHERE r.review_id =3
ORDER BY r.review_timest...
Hello,
I am using some MySQL tables. Their structures are listed below.
"login":
loginid username password email actcode disabled activated created points website location age gender
Each user has a loginid
"submission":
submissionid loginid title slug url displayurl datesubmitted
In the submission table above, the "loginid" is...
I've tried to connect to mysql using DefaultHttpClient, but so far no success. Error connection refused.
I can telnet MySQL using telnet 127.0.0.1 3306
enter code here
I'am using this example from apache website
DefaultHttpClient httpclient = new DefaultHttpClient();
httpclient.getCredentialsProvider().setCredentials(
...
I have a table similar to this:
=================
| Id | ParentId |
=================
| 1 | 0 |
-----+-----------
| 2 | 1 |
-----+-----------
| 3 | 0 |
-----+-----------
| 4 | 3 |
-----+-----------
| 5 | 3 |
-----+-----------
| 6 | 0 |
-----+-----------
| 7 | 6 |
-----+-----------
...
Hi all,
I’m currently in the process of developing my own blogging system. Currently when you create a new post, you get the option to archive it categories of your own choise.
Currently I’m storing the categories as a VARCHAR value in a mysql database. As an example the field will contain 2,4,8 if the user has chosen the categories wi...
I'm trying to implement the advice found in this great blog post for batch processing in grails with MySQL. The problem that I'm having is that inclusion of periodic calls to session.clear() in my loop causes org.hibernate.LazyInitializationException's to be thrown. There's a quote down in the comments section of the page:
You’re sec...
I am having trouble with a mysql query. I want to get a unique pairing of names that share the same tenant_group_id number. All you need to know is that each tenant has a unique individual_tenant_id and up to two individual tenants share the same tenant_group_id.
SELECT t1.first_name, t2.first_name
FROM individualtenant t1
...
A lot of our automated processes use perl and need to access our MySQL DBs. I hate to admit it, but up until recently we haven't really done much benchmarking with the majority of our processes. One of our devs setup a test to compare the performance of "use MySQL" vs "use DBI" with the following pseudocode:
for ($i = 1; $i <= 1000; $...
I'm writing a program that first queries with mySQL and then sorts that data. I want to be able to have a user type "python program_name.py mySQL_query" and have the program insert "mySQL_query" into the query at the beginning of the program. The issue I'm running into is the sys.argv command converts the input into a string, which mySQL...
A general question, without a specific case in mind - is it usually preferred to use MySQL stored procedures over writing a PHP script that performs the same calculations and queries?
What are the benefits of each method?
...
Hi All, quicky question on SQLite3 (may as well be general SQLite)
How can one retrieve the nth row of a query result?
row_id (or whichever index) won't work on my case, given that the tables contain a column with a number. Based on some data, the query needs the data unsorted or sorted by asc/desc criteria.
But I may need to quickly ...
Hi, I have a trouble displaying Cyrillic characters properly. Looked in forums, tried a few different thing and nothing works.
Site runs on PHP / MySQL.
MySQL tables charset is utf8, and collation is utf8_general_ci
Name entry in DB looks correct (in PhpmyAdmin):
Sasha Рукина
Output on page http://www.sodaq.com/: Sasha ??????
Inside...
hi everyone ..
I am developing a student results website in which :-
Every year has its own subjects ( 1st year has sub1 , sub2 , sub3 and 2nd year other subjects and so on ) which will be added , deleted by the admin of the site .
I designed three tables :-
"Students" : contains info about students and their current year .
"Subjec...
Well, I guess the title sums it up pretty well. The connector comes with Visual Studio libraries and dlls. There is also a source tar available which doesn't compile.
...
At work I'm constantly being told that when changes are made to a MySQL db that the views need to be 'refreshed'. The accepted manual solution seems to be going into Workbench, right clicking, and hitting 'Refresh All'
Is this just meant to be clearing the cache? Or does that rebuild the views from scratch, or is this totally bogus? The...
Hello,
I wanted to know if there is a way I can directly increment the value of a column without reading the current value.
something like:
update table `user` set cnt = cnt+1
The above statement gave me a syntax error, but I am sure there has to be something for it.
Thanks
...
Title: multiple class with same variable name list has issues in table definition (all indices not null)
lets say i have two class implementing from one interface
public interface IInterface1
{
IList<string> myList {get; set;}
}
public class class1 : IInterface1
{
IList <string> myList {get; set;}
public class1()
{
...
Well, I can't seem to figure out why this isn't working. (there is a description of the error at the bottom)
<script type="text/javascript">
$(document).ready(function(){
$('#submit').click(function(){
$('input[type=checkbox]:checked').each(function(){
ajax=$.ajax({
type: "POST",
url: "rollcall_submitvote.php",
data: '...
Hi. I am trying to get used to writing object oriented, but often I get a little stuck. I have this queries that I want to use to create arrays.
$user1 = mysql_fetch_object(mysql_query("SELECT * FROM tbl WHERE username='$oc->user1'"));
$user2 = mysql_fetch_object(mysql_query("SELECT * FROM tbl WHERE username='$oc->user2'"...