Sponsored Content
Top Forums Programming mysql_real_connect missing value? Post 49160 by dmccabe2 on Friday 26th of March 2004 01:11:39 PM
Old 03-26-2004
mysql_real_connect missing value?

Can anyone help Im just getting to grips with c basics, Im trying to compile and its saying missing Value I think its to do with the mysql_real_connect but not sure?...

PHP Code:
int sql_auth_off() {
  const 
char *database_user DATABASE_USER;
  const 
char *database_pass DATABASE_PASS;
  const 
char *database_name DATABASE_NAME;
  const 
char *database_table DATABASE_SQLOFF_TABLE;
  const 
char *database_column DATABASE_SQLOFF_COLUMN;
  
MYSQL_RES *r;
  
MYSQL_ROW row;
  
char query[1024];
  
char *off=NULL;

  
sprintf(query,
      
"SELECT %s FROM %s;",
      
database_column,
      
database_table);

  
mysql_init(&mysql);
  
mysql_real_connect(&mysql"localhost"database_userdatabase_pass);
  if(
check_for_mysql_error()) {
    
mysql_close(&mysql);
    return 
0;
  }

  
mysql_select_db(&mysqldatabase_name);
  
mysql_query(&mysqlquery);
  if(
check_for_mysql_error()) {
    
mysql_close(&mysql);
    return 
0;
  }

  
mysql_store_result(&mysql);
  
row mysql_fetch_row(r);
  
mysql_free_result(r);
  
mysql_close(&mysql);
  if(&
row[0])
    
off strdup(row[0]);

  if (
off != NULL && !strcmp(off,"on"))
    return 
1;

  return 
0;

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

what am I missing?

I have the following portion of a script Check() { echo "\n\nChecking that all constraints are Enabled" echo "..." sleep 2 CHECK_COUNT='sqlplus -s $1 <<-EOSQL4 set feed off pause off pages 0 head off; set linesize 150 echo off; select count(*) from user_constraints where... (4 Replies)
Discussion started by: Zelp
4 Replies

2. Solaris

missing libsunmath.so.1

Hi, I have an application which requires libsunmath.so.1, however; my os version seems to be missing this file (find from root level did not return anything). Version: SunOS 5.10 where can I get this file? thanks, (1 Reply)
Discussion started by: orahi001
1 Replies

3. Solaris

Memory Missing ?

Hello All, I have oracle running on Solaris 5.10 SPARC 64bit. Physical memory is 16Gb. NPROC USERNAME SWAP RSS MEMORY TIME CPU 114 oraprd 13G 13G 82% 513:25:53 0.4% 46 root 180M 225M 1.4% 149:13:33 0.1% 6 daemon 42M 45M 0.3% 14:01:59 0.0%... (6 Replies)
Discussion started by: JohnJacobChacko
6 Replies

4. Linux

library missing

Hi, I am trying migrate webmin application from solaris to linux. But that is not working in Linux. because the library librpcsoc.so has missed in Linux box.. Could you please advice me that how to resolve this issue and also that how to install that library as well. (1 Reply)
Discussion started by: Mani_apr08
1 Replies

5. Shell Programming and Scripting

[: missing `]'

Hi, I am getting this error while running the following code. i=`awk '{print $2}' test1.txt` j=`awk '{print $4}' test1.txt` k=`awk '{print $6}' test1.txt` if ; then echo "Up." else echo "down" fi rm -f test.txt test1.txt error is this: line 12: ' Please suggest. (2 Replies)
Discussion started by: arijitsaha
2 Replies

6. Shell Programming and Scripting

Need help looking for missing hours.

I have a file that should cover a days worth of stats, at the beginning of each 15 minute report I have a unique header that looks like the below example. The "0000" and "0015" will change in the header line to show which 15 Minute interval the report is covering and of course from day to day the... (7 Replies)
Discussion started by: fsanchez
7 Replies

7. SuSE

How to resolve missing missing dependencies with opensuse 11.3 and 12.3?

Hello, This is a programming question as well as a suse question, so let me know if you think I should post this in programming. I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

8. Red Hat

Yum - resolving missing dependencies that are not missing

I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following: sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm Loaded plugins: fastestmirror Setting up Local Package... (13 Replies)
Discussion started by: gw1500se
13 Replies

9. Programming

Missing cout

Heyas Me trying some C.. cout in specific, thats what i remembered: #include <stdio.h> // -- Just the above or with all the below ones, no change #include <stdio_ext.h> #include <stdlib.h> #include <wchar.h> //#include <iostream> // I assume its the same anyway? //#include <iostream.h>... (2 Replies)
Discussion started by: sea
2 Replies
All times are GMT -4. The time now is 04:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy