Sponsored Content
Top Forums Programming PHP Script Not Writing Bankfee To Database Post 302320586 by Neo on Thursday 28th of May 2009 11:28:41 AM
Old 05-28-2009
PHP Script Not Writing Bankfee To Database

The attached file, credits.php, is part of our new (experimental) banking / credits system for this site.

I added a field bankfee in credits_transactions but it is not writing to the database (no PHP error).

Can someone take a look at the attached PHP file and see if they can find out why bankfee in the database table credits_transactions does not update from the initialized value of zero?

Code:
/* Neo: original
                $db->query_write("INSERT INTO " . TABLE_PREFIX . "credits_transactions (fromuserid, touserid, action, anonymous, comment, amount, timestamp, completed) VALUES (" . $vbulletin->userinfo['userid'] . ", " . $duser['userid'] . ", 'donate', " . $vbulletin->GPC['anonymous'] . ", '" . $db->escape_string(fetch_censored_text($vbulletin->GPC['comment'])) . "', " . $vbulletin->GPC['amount'] . ", " . TIMENOW . ", " . intval($notmoderated) . ")");
*/
                $db->query_write("INSERT INTO " . TABLE_PREFIX . "credits_transactions (fromuserid, touserid, action, anonymous, comment, amount, bankfee, timestamp, completed) VALUES (" . $vbulletin->userinfo['userid'] . ", " . $duser['userid'] . ", 'donate', " . $vbulletin->GPC['anonymous'] . ", '" . $db->escape_string(fetch_censored_text($vbulletin->GPC['comment'])) . "', " . $vbulletin->GPC['amount'] . ", " . $vbulletin->GPC['bankfee'] . ", " . TIMENOW . ", " . intval($notmoderated) . ")");

 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

writing database tables into a file in unix

I want to collect the database tables(Ex: Emp,Sal,Bonus...etc) in a file & give this file at the command prompt, when prompted for the tables list at command prompt. How can i do that ? Ex:- Import jason/jason1 tables=emp,sal,bonus log=j1.log i want to change this into Ex:- Import... (3 Replies)
Discussion started by: dreams5617
3 Replies

2. Shell Programming and Scripting

writing script file for database

how to disable a constraint type of a field (present in diffrent tables) in the database unix a unix script file.. (3 Replies)
Discussion started by: shaksing
3 Replies

3. Shell Programming and Scripting

Reading data from DataBase and Writing to a file

Hi All, Please help me in writing data to a file in one row. In database there is a column which contains large data which does not fit in the file in one row. The column contains list of paths. I want to write these paths to a file in one row. Please find the code below writes : ... (2 Replies)
Discussion started by: rajeshorpu
2 Replies

4. Virtualization and Cloud Computing

Problems with PHP query to MySQL database

Hello all, I completed a website (it was code by php) and putted it to AWS, I install fedora instance in EC2 with the base is php and mysql. I putted all files of my website to folder /home/webuser/helloworld/htddocs and my database (mysql) to folder /var/lib/mysql/test ("test" is my... (2 Replies)
Discussion started by: hero132
2 Replies

5. Programming

[PHP] asking how to make plain text database searching system

hi, i want to ask, how to make a plain text database (u need to call and search all the data manually) in PHP. i am going to apply it in UNIX os. anyone have any idea how to do it? most of the data only using mysql while i am forbid to do so. (2 Replies)
Discussion started by: grandios
2 Replies

6. Shell Programming and Scripting

Several processes writing to an SQLite database at the same time

I have several bash scripts that write to an SQLite3 database at the same time. At some occasion the database returns: SQL error: database is locked. How would be the best way, to make a process to wait until the data base is 'free' again. I tried: sqlite3 test.db ".timeout 1000; update....."... (2 Replies)
Discussion started by: creamcheese
2 Replies
php-config(1)							Scripting Language						     php-config(1)

NAME
php-config - get information about PHP configuration and compile options SYNOPSIS
php-config [options] DESCRIPTION
php-config is a simple shell script for obtaining information about installed PHP configuration. OPTIONS
--prefix Directory prefix where PHP is installed, e.g. /usr/local --includes List of -I options with all include files --ldflags LD Flags which PHP was compiled with --libs Extra libraries which PHP was compiled with --man-dir The directory prefix where the manpages is installed --extension-dir Directory where extensions are searched by default --include-dir Directory prefix where header files are installed by default --php-binary Full path to php CLI or CGI binary --php-sapis Show all SAPI modules installed on the Debian system --configure-options Configure options to recreate configuration of current PHP installation --version PHP version --vernum PHP version as integer SEE ALSO
php(1) VERSION INFORMATION
This manpage describes php, version 7.0.33-6+ubuntu18.04.1+deb.sury.org+3. COPYRIGHT
Copyright (C) 1997-2017 The PHP Group This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available through the world-wide-web at the following url: http://www.php.net/license/3_01.txt If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to license@php.net so we can mail you a copy immediately. The PHP Group 2017 php-config(1)
All times are GMT -4. The time now is 07:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy