I am really new to drupal and new to php.
I have some questions.
Suppose I have a drupal and a server running on my local machine, how does drupal interact with database? (database is mysql)
it doesn't matter which version of drupal it is, I just want to know how drupal interacts with database.
Thank you!
...
Here is the situation:
I have a "user" , which have many attributes. For example, "name", "email", "password", "phone".
There are some attributes that are open for public, for example, "name", "email".
These information is open for evenbody who visit the site.
But some, only for trust body in the system, for example "phone".
These i...
Hi there
I have an MS Access frontend and MySQL backend.
Everthing runs well however I am trying to avoid the following.
On an Access form, I use it to do read queries.
Once the results are shown on the Access form (excel like format), I can sort A-Z, Z-A etc
The thing is that everytime I do any sorting, I can see on MySQL Administrator...
Hello friends I am getting problem when injecting JSF bean into a bean that extends StoredProcedure abstract class...
The Bean return null values...
...
How can I retrieve the last 10 rows inserted into a table?
...
I am confuse on how to limit selection in MySQL (e.g SELECT * FROM tblProduction LIMIT 1,N;) where N is unknown.. Can anyone help me on how can I limit the selection in MySQL? I want to show the records starting from row 2 (two) up to the end of the records. Thanks!
...
I have a table that lists people and all their contact info. I want for users to be able to perform an intelligent search on the table by simply typing in some stuff and getting back results where each term they entered matches at least one of the columns in the table. To start I have made a query like
SELECT * FROM contacts WHERE
...
I ve formatted a date column in mysql like DATE_FORMAT(enquiry.enquiryDate,'%d-%b-%Y') as enquiryDate and now i want sql server equivalent for this?
...
I always used the loop method to get all records from resource received from mysql_query(), but I wonder is there a easier way to accomplish this task?
e.g.:
SELECT table_schema, table_name FROM information_schema.tables;
I suppose it should either way return more, than just one record.
Question is short, but I think I explained mys...
I have a database that contains user details including sensitive data. They're not as sensitive as financial, but they are sensitive nonetheless. The passwords to the accounts are hashed and salted but the rest can only be encrypted not hashed to allow editing.
How far would you go encrypting the fields? Would you go as far as encrypti...
Hi,
this is a bit of a big question, so if anyone can point me to a great tutorial or something else if its too long to answer here that would be great.
I have a MySQL database, and I want to have an ACL system to manage permissions to an object.
E.g
Customer (read | edit | update | delete)
So I was thinking I need the following ta...
I have tried to create table inside the Mysql Trigger but not get created. How to create a table using trigger,here Name of the table being passed Dynamic?
...
I´m trying to do the following query in PHP
$sqlstr = mysql_query("SELECT * FROM sales where passport = $row['passport']");
if (mysql_numrows($sqlstr) != 0) {
while ($row = mysql_fetch_array($sqlstr)) {
echo $row['firstname'];
}}
How can I incorporate the value of $row['pass...
I'm working on encrypting some database fields. By encrypting of course I lose some search functionality. I found this library called SQLCipher which handles the encryption at the database level, but it's for SQLite. Is there something similar for MySQL?
...
Can anyone help me with a good list of php site search engines. I am thinking of implementing a google site search, but I would rather not pay for that and I would rather have as much control as I can over it.
...
I have a table in mysql like this:
+-------+--------+-------------+
| child | parent | data |
+-------+--------+-------------+
| 1 | 0 | house |
| 2 | 0 | car |
| 3 | 1 | door |
| 4 | 2 | door |
| 5 | 2 | windscreen |
| 11 | 5 | wiper |
+-----...
I have this code,
$sqlstr = mysql_query(
"SELECT * FROM sales where passport = '{$therecord['passport']}'");
if (mysql_numrows($sqlstr) != 0) {
echo "<b>Sales for {$therecord['firstname']} {$therecord['lastname']}</b>";
while ($row = mysql_fetch_array($sqlstr)) {
echo "<table><tr>";
echo "<td>{$row['product']...
I've found a good way to store some data in the database with a binary sequence, like 0b0101000 and find rows that give a positive result after applying a mask.
For exemple : SELECT (0b0101010 & (1<<3 | 1<<5))>0; allows me to get rows with the 3rd or 5th bit on, no matter if the others bits are on or off.
The problem is when I want to ...
InnoDB seems almost entirely superior but in what case should I go for MyIsam?
Thanks in advance!
...
I am using the following SUM query with SQL
SELECT SUM(cost) as total FROM sales where passport =
How would I exclude certain records from the calculation, for example where paid = 1?
...