Hi
I'm just looking through a php file and have come across the following code:
switch (nvl($mode))
{
case "add" :
print_add_category_form(nvl($id, 0));
break;
case "edit" :
print_edit_category_form($id);
break;
}
What does the nvl() function do??
...
I'm running Vista 64 box, and attempting to setup Joomla using IIS7 (I like Joomla, I want to have some asp.net components on my web site, so that's why I want to use IIS7 and not Apache). It's my first time installing both php and mysql, so it's very possible that I'm doing something obviously wrong... though I think I tried enough diag...
I need help regarding saving sessions into mysql.
Right now I am using php normal sessions for my login system.
Here is my code:
auth.php
<?php
session_start();
include('db.inc.php');
$email=mysql_real_escape_string($_POST['email']);
$pwd=mysql_real_escape_string($_POST['pwd']);
$sql="Select member_id,email,password,nama,type from u...
I need to design a DB for a forum. I am separating the root post from it's sub-posts for various reasons. I need the text the user enters to be optimally search-able, also from performance point of view.
My question, should I separate each table (root-posts and sub-posts) into two tables:
root-posts_meta (hold data such as id,creatio...
I am converting about 4000 text files that contain HTML into MySQL database entries. Seems like an easy way to do this would be to add a couple lines to the HTML to make them appear as XML files, then XSLT the XML into MySQL INSERT statements. (Building a CSV would also work, but less optimal IMHO). I've tried doing this but am having li...
I've dabbled with MySQL and personally, I find it vastly inferior to better RDBMSs like Postgres; while I admit it's come a long way and improved, even the latest version to my knowledge does not even support CHECK constraints to verify data integrity (it allows the keyword but doesn't do anything with it).
As someone who is looking at ...
I am calling mysql.exe from Java to load a database. Because the process just hangs, I need to create a command file and pass in the username and password.
Example contents of command.bat:
mysql --user="%1" --password="%2" mydatabase < myscript.sql
The problem is that I cannot see the output of the mysql command to see if there were...
Hi
I have mysql database and I want to get the last ID from field in a table .
example : -
id Value
1 david
2 jone
3 chris
I want a function return 3 if this table exist .
...
I have an application in Grails.
I use Hibernate to access the database (per standard grails rules)
I use MySql and the site works and is stable (for 6 months).
I am doing load testing, and recently discovered that the database rejects connections when under load.
Using MySQL Server 5, I can see threads connected hovering around 20. Th...
Lets say I have a simple many-to-many table between tables "table1" and "table2" that consists from two int fields: "table1-id" and "table2-id". How should I index this linking table?
I used to just make a composite primary index (table1-id,table2-id), but I read that this index might not work if you change order of the fields in the qu...
Is it possible to have phpmyadmin or other tool to import a csv or sql backup into an existing DB and skip the primary key or is this a manual, table by table process of inserting with queries and manually removing the primary key?
...
Quickie:
Table structure:
id | name | parent_id
I want to run a query for ID's, but also return that item's parent_id and the name of that id as well.
To better explain
SELECT id, name FROM sections
...then for each ID, return the ID and name of its parent using the "parent_id" column.
I'm trying to get this into an array:
[0]
...
I'm having difficulty getting crystal report to load data from a MySQL DB. I am using the Connector/NET and have a DataSet in the project which can access the data just fine. I am able to set the report data source to a DataTable from the DataSet. Crystal reports seems to know all about the column information, as I can create fields etc....
$befal = mysql_query("SELECT * FROM users WHERE username = $_GET[username]");
$rad = mysql_fetch_assoc($befal);
Equals
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\profile.php on line 4
I have a user called Admin in the field username and it still dont work. profile.php?user=Admin...
Thi...
I have following query:
Select diary_id,
(select count(*)
from `comments` as c
where c.d_id = d.diary_id) as diary_comments
From `diaries` as d
It takes very many time (near 0.119415 in my case).
How I could solve this problem?
I see only one way: doing additional query for comment number for each row from my main que...
I have a MySql database with a certain feild that contains a date.
How can I convert it to a C# DateTime object?
And how do I convert a C# DateTime object so I can insert it to the database?
...
I am working on a Drupal based site and notice there are a lot of seperate CSS and js files. Wading though some of the code I can also see quite a few cases where many queries are used too.
What techniques have you tried to improve the performance of Drupal and what modules (if any) do you use to improve the performance of Drupal 'out o...
I have a table with index (autoincrement) and integer value. The table is millions of rows long.
How can I search if a certain number appear in the last n rows of the table most efficiently?
...
I have this table
ID | Category | Subcategory |
1 | Books | Comic |
2 | Books | Fiction |
3 | Cars | New |
4 | Books | Non- fiction |
4 | Cars | Second h...
Hi community,
I'm trying to achieve the following:
SELECT id, name FROM t_profiles MINUS (SELECT p.id, p.name FROM t_profiles AS p LEFT JOIN t_skills AS s ON p.id = s.id_employee WHERE s.lvl>0 and s.id_task=1)
Is there an easy way to do this in MySQL?
...