07-02-2003
now I get this
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\phpdev\www\dev\compulearn\in work\main.php on line 18
Access denied for user: 'content@127.0.0.1' (Using password: NO)
ive no user or password on the db.
this is whats in the db_fns.php which is inlcuded once in main.php
<?php
//connect to database and retreive info from tables
function db_connect()
{
$result = @mysql_pconnect('localhost', 'content', '');
if (!$result)
return false;
if (!@mysql_select_db('content'))
return false;
return $result;
}
function get_story_record($story)
{
$conn = db_connect();
$sql = "select * from stories where id = '$story'";
$result = mysql_query($sql, $conn);
return(mysql_fetch_array($result));
}
?>
i then removed the usr and pass stuuf to:
<?php
//connect to database and retreive info from tables
function db_connect()
{
$result = @mysql_pconnect('', '', '');
if (!$result)
and i get this now
Unknown column 'published' in 'where clause'
I have no data in the database.
7 More Discussions You Might Find Interesting
1. Linux
Hi frnds
I installed phpmyadmin for OTRS but when ever i tried to open the phpMyAdmin-2.6.2/index.php page i m getting the following error
" urldecode the db name if (isset($lightm_db)) { // no longer urlencoded because of html entities in the db name // $db =... (8 Replies)
Discussion started by: naik_mit
8 Replies
2. Filesystems, Disks and Memory
why do inode indices starts from 1 unlike array indexes which starts from 0
its a question from "the design of unix operating system" of maurice j bach
id be glad if i get to know the answer quickly
:) (0 Replies)
Discussion started by: sairamdevotee
0 Replies
3. Shell Programming and Scripting
Hello,
I have this code:
#!/bin/sh
awk -v val="........." 'BEGIN{FS=OFS=" ";c=0}
NR==FNR&&d==0{a=$0; c++;next}
FNR==(NR-c){b=val;next}
{if(1234 in a){print "okay"}}
{print $1}' listi fpr.11 grn
that is working (awk find the value in the table "a" and return "okay" followed by 1234)
... (2 Replies)
Discussion started by: jolecanard
2 Replies
4. Web Development
Hello guys,
Does anyone can help me?
I've just made my simple index.php without any code, but after insert session code to check if any user is authenticated, my index.php doesn't work anymore.
Any fresh eyes could help me to see what and where the code is wrong?
<?
if... (6 Replies)
Discussion started by: metalfreakbr
6 Replies
5. UNIX for Advanced & Expert Users
hi,
while separated they produce the usual mail alert and i can see the output...
if i write into the php script:
<?php
system('php -f /var/www/vhosts/domain.com/httpdocs/folder/script1.php');
system('php -f /var/www/vhosts/domain.com/httpdocs/folder/script2.php');
system('php -f... (0 Replies)
Discussion started by: 7stars
0 Replies
6. Red Hat
Dear All,
My redhat version is:
# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
#
# uname -a
Linux cotapplication3.cot.com 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
#
I want to update my php from:
# php... (1 Reply)
Discussion started by: monojcool
1 Replies
7. Shell Programming and Scripting
so i have a bit of a unique situation.
i have an encrypted index.php file that that can't be run the normal way that a web browser would run it. if it is run the normal way, the php script will show only gibberish on the web browser, instead of the actual php code.
when run from the command... (8 Replies)
Discussion started by: SkySmart
8 Replies
LEARN ABOUT PHP
debug_print_backtrace
DEBUG_PRINT_BACKTRACE(3) 1 DEBUG_PRINT_BACKTRACE(3)
debug_print_backtrace - Prints a backtrace
SYNOPSIS
void debug_print_backtrace ([int $options], [int $limit])
DESCRIPTION
debug_print_backtrace(3) prints a PHP backtrace. It prints the function calls, included/required files and eval(3)ed stuff.
PARAMETERS
o $options
- As of 5.3.6, this parameter is a bitmask for the following options:
debug_print_backtrace(3) options
+----------------------------+---------------------------------------------------+
|DEBUG_BACKTRACE_IGNORE_ARGS | |
| | |
| | Whether or not to omit the "args" index, and |
| | thus all the function/method arguments, to save |
| | memory. |
| | |
+----------------------------+---------------------------------------------------+
o $limit
- As of 5.4.0, this parameter can be used to limit the number of stack frames printed. By default ($limit= 0) it prints all stack
frames.
RETURN VALUES
No value is returned.
CHANGELOG
+--------+-----------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------------------+
| 5.4.0 | |
| | |
| | Added the optional parameter $limit. |
| | |
| 5.3.6 | |
| | |
| | Added the optional parameter $options. |
| | |
+--------+-----------------------------------------+
EXAMPLES
Example #1
debug_print_backtrace(3) example
<?php
// include.php file
function a() {
b();
}
function b() {
c();
}
function c(){
debug_print_backtrace();
}
a();
?>
<?php
// test.php file
// this is the file you should run
include 'include.php';
?>
The above example will output something similar to:
#0 c() called at [/tmp/include.php:10]
#1 b() called at [/tmp/include.php:6]
#2 a() called at [/tmp/include.php:17]
#3 include(/tmp/include.php) called at [/tmp/test.php:3]
SEE ALSO
debug_backtrace(3).
PHP Documentation Group DEBUG_PRINT_BACKTRACE(3)