Hi there,
I have a hierarchical database that include 4 tables. Table A is the parent of B, B is Parent of C, C is parent of D. If I want to query everything in D that is associated with A.name, how do I do that? Thanks!
YanYan (0 Replies)
I am debugging some code and came across ? in the WHERE cause in a mysql query.
Is this possible and what situations would this be used?
SELECT ip, count
FROM table
WHERE domain=?
thanks & regards (2 Replies)
Hi there, I have a table that stores multiple records for many different servers, each of which is timestamped ... I wanted to write a query that would enable me to only output the "latest" record (based on timestamp) for each "unique" server. So for example my main table looks like this
... (3 Replies)
hello all
i have 2 columns every column in the following format
column1
2011-04-01 11:39:54
column2
2019-02-03 00:00:00
i want get difference between above data as following
2 days 11:39
how to do so ?
i tried many functions but nothing works
please advice what is the query... (6 Replies)
Hi,
I want to access mysql query from database , for that i have tried the below code
#! /bin/bash
TABLE_NAME=database1
USER_NAME=root
IP_ADDR=111.20.9.256
somevar=`echo "select altid from alert where altid='2724'"| mysql -h $IP_ADDR -u $USER_NAME $TABLE_NAME `
echo $somevar
... (1 Reply)
Hi,
I want to run below query on shellscript but having one problm.
ADV=$( mysql -h "$IP_ADDR" -u "$USER_NAME" "$TABLE_NAME" -BNe" SELECT ADV FROM indata where inid='$INSTRUID' and Date='$latest Date';" )
here Date column contans different below dates
2011-12-01... (11 Replies)
Hi All,
i have a table in mysql with the following data
Table name Test
Assettype Serial_No Status location
Mouse 123456 In Stock chennai
Mouse 98765 Allocated chennai
Keyboard ... (2 Replies)
Hello Friends,
I am using check_mysql_query plugin in nagios to query database and get output. query is working fine but output which i am getting contain query. I want to remove query from output and give custom message which will be simple and understandable.
Can you help me here with any... (5 Replies)
Discussion started by: ghpradeep
5 Replies
LEARN ABOUT OPENSOLARIS
realpath
realpath(3C) Standard C Library Functions realpath(3C)NAME
realpath - resolve pathname
SYNOPSIS
#include <stdlib.h>
char *realpath(const char *restrict file_name,
char *restrict resolved_name);
DESCRIPTION
The realpath() function derives, from the pathname pointed to by file_name, an absolute pathname that names the same file, whose resolution
does not involve ".", "..", or symbolic links. The generated pathname is stored as a null-terminated string, up to a maximum of {PATH_MAX}
bytes (defined in limits.h(3HEAD)), in the buffer pointed to by resolved_name.
RETURN VALUES
On successful completion, realpath() returns a pointer to the resolved name. Otherwise, realpath() returns a null pointer and sets errno
to indicate the error, and the contents of the buffer pointed to by resolved_name are left in an indeterminate state.
ERRORS
The realpath() function will fail if:
EACCES Read or search permission was denied for a component of file_name.
EINVAL Either the file_name or resolved_name argument is a null pointer.
EIO An error occurred while reading from the file system.
ELOOP Too many symbolic links were encountered in resolving file_name.
ELOOP A loop exists in symbolic links encountered during resolution of the file_name argument.
ENAMETOOLONG The file_name argument is longer than {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
ENOENT A component of file_name does not name an existing file or file_name points to an empty string.
ENOTDIR A component of the path prefix is not a directory.
The realpath() function may fail if:
ENAMETOOLONG Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
ENOMEM Insufficient storage space is available.
USAGE
The realpath() function operates on null-terminated strings.
Execute permission is required for all the directories in the given and the resolved path.
The realpath() function might fail to return to the current directory if an error occurs.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO getcwd(3C), limits.h(3HEAD), sysconf(3C), attributes(5), standards(5)SunOS 5.11 9 Oct 2003 realpath(3C)