I am working on an attendance/overtime module for a schedule web app. The idea is that there is a table in MySQL of shifts, each shift having a start and end time. The manager will choose a shift and make an entry into the attendance table specifying whether the employee was early/late/left early/worked overtime. That entry in the attend...
I need some help on creating a user profile system. I want it to be like Facebook or Myspace where it has only the username after the address, no question marks or anything, for example, www.mysite.com/username. I have all the register, logging scripts, etc. all done, but how do I go to profiles using the URL example above, "/username"?
...
Hello, I'm currently using PHP/MySQL to select some data from my database. My current SELECT statement is:
mysql_query("SELECT * FROM tblpm WHERE receiver_id ='$usrID' GROUP BY
thread_id ORDER BY unique_id DESC") or die(mysql_error());
There are some columns that have the same "thread-id", thus, I am using the GROUP BY, so that only...
Is there any way to search like below criteria in mysql?
If any the pl reply.
if i search with "murray's" then it then it will return fine data for "murray's" but it should also return data for "murrays" means same word without apostrophy(').
same way if i search without apostrophy('), the it will search also with apostrophy(').
at la...
I am using jQuery UI on the front end. I want to get the values off MySQL database on my page on a mouseclick using AJAX.
How do I retrieve data from MySQL using jQuery and update my div with the new HTML without a page refresh?
Thanks
...
Hi,
I am currently trying to construct a somewhat tricky MySQL Select Statement. Here is what I am trying to accomplish:
I have a table like this:
data_table
uniqueID stringID subject
1 144 "My Subject"
2 144 "My Subject - New"
3 144 "My Subject - Newest"
4 211 "Some other colu...
I have a project with MS-Access (Front End) + MySQL (BackEnd)
There are STATUS and DEL_FLG columns in a table called TB_STATUS
strSQL = "SELECT * FROM TB_STATUS"
rs.Open strSQL, cn, adOpenKeyset, adLockOptimistic
If rs.RecordCount <> 0 Then
Set Form.Recordset = rs
rs.Close
End If
User Interface is
|text||valid||invalid|
A ...
I am implementing a notification system and seeing if these suggestions are valid to set up, if one is better than the other or a better solution is available:
A notification is added to the database. A guest / identifiable user logs onto or uses the site. They are greeted with notifications they haven't seen before with the option to c...
Here is my problem, i have a class with a ave method, i want to pass a Mysql DB link to it, so i create a new object from the class, and call the saveProperty method, and in my main file i created a MySQL connection and saved the link in a var called $db so when i call the method it's link this: saveProperty($db).
but insted of saving t...
i am using this query
select date_time_posting from table where FROM_UNIXTIME(date_time_posting,'%d-%m-%Y')='$c_day_date'
where $c_day_date is having dates in dd-mm-yy format like 25-07-2009
My server is in different time zone from mine.Total difference is of about 6 hours i.e. my local timezone is 6 hours ahead of my server timezone....
I track a lot of parameters on my Server and the only thing I can't realy put in perspective is the IOstat. It is a MySQL Server, is this a good result, or should I worry?
root:/var/lib/mysql# iostat -xc
Linux 2.6.28-11-server () 07/25/2009 _x86_64_ (8 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
...
Cant figure out what the problem is!
$msgs = mysql_num_rows(mysql_query("SELECT * FROM messages WHERE recipient = $userID AND read = 0"));
echo $msgs;
The above code works if I remove "and read =0". But if not i get:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in left_menu.php on line 16.
I h...
I have a problem selecting from a link table and filtering out superfluous results.
Publications belong to packages by means of the package_publications table.
For instance, I know the ids of my publications to be 11 and 47. I want to return a package that has ONLY those publications in it.
Now if I do a join and do something like whe...
This is a weird issue. I'm accessing my online database using premiumsofts Navicat for mysql. Some of the records are behaving very strange - let me give an example. I have the following table columns id, name, address, abbreviation, contact. Now when I run a sql query for lets say any entry that has the abbreviation 'ab' it returns zero...
I have a query like this:
SELECT lesson.id, p1.first_name, p1.surname, start_time, instrument.name
FROM lesson, person AS p1, person AS p2, instrument, invoice_lesson
WHERE lesson.student = p1.id
AND lesson.teacher = p2.id
AND instrument.id = lesson.instrument_id
ORDER BY surname
However, I would like to modify it so that it on...
I am redeveloping a web application and its infrastructure originally using SQL Server 2005, ASP.NET & Windows 2003 to a LAMMP (extra M for memcached of course) stack and since the schema is heavily refactored (with very good reason to do so) I must write a custom migration app.
The problem is the InnoDB primary + foreign key constrain...
I have a c program running on ubuntu connecting to mysql (5.0.51a-3ubuntu5.4-log).
The programs main task is to process records from a small (<5000 rows) myisam table. If the row is processed successfully it is deleted. If not it is retried at a latter date. After a number of failed attempts it is deleted. The deletion uses the tables p...
I'm knee deep in modifying some old logging code that i didn't write and wondering what you think of it. This is an event logger written in PHP with MySQL, that logs message like:
Sarah added a user, slick101
Mike deleted a user, slick101
Bob edited a service, Payment
Broken up like so:
Sarah [user_id] added a user [message], slick10...
I have this rather complex query that grabs data from three tables, and now I want it to be even more complicated (Oh dear)!
I'd like the last posted feature to be displayed in it's own section of the page, and that's pretty easy by selecting the last entry in the table. However, for the complex query (the main page of the site), I'd li...
Something that has been puzzling me for a bit now, and an hour or two of googlin' hasn't really revealed any useful answers on the subject, so I figured I'd just write the question.
When I create a database in SQL using 'CREATE DATABASE DBNAME' am I implicitly creating a catalog in that database? Is it proper to refer to that 'DBNAME' a...