php---sql


 
Thread Tools Search this Thread
Special Forums Cybersecurity php---sql
# 1  
Old 09-10-2001
php---sql

// Connect to the database server
$dbcnx = @mysql_connect("localhost","root", "password"); if (!$dbcnx) { echo( "<P>Unable to connect to the " ."database server at this time.</P>" ); exit(); }

I am using a statement like this to connect to my sql server, however, i do not quite understand some general syntax.

localhost= is this going to be the ip of my linux box, or my firewall
password & root = when i do put char's into here do I take away the quotes??
# 2  
Old 09-10-2001
daa...I figured it out.
thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Storing multiple sql queries output into variable by running sql command only once

Hi All, I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise. Eg : Select 'Query 1 output' from dual; Select 'Query 2 output' from dual; I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies

2. Shell Programming and Scripting

How to add decimal month to some month in sql, php, perl, bash, sh?

Hello, i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m i need to write this script in php or bash or sh or mysql or perl in normal time o unix time i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Discussion started by: bacarrdy
14 Replies

3. Shell Programming and Scripting

Getting junk data from MS SQL Server 2008 R2 using PHP 5.3.16

Hey!!! I am just trying to connect MS SQL Server 2008 R2 from PHP Version 5.3.16 using IIS 7.0. I am able to connect my MS Sql Server but I am getting junk data eventhough there is a valid data exists. I don't know what is the reason for that. Below is my code snippet. $conn =... (0 Replies)
Discussion started by: rangarasan
0 Replies

4. UNIX for Advanced & Expert Users

Using PHP , call a sql inside a unix script

I am running the xampp on WINDOWS, and my php script is connecting to a unix script on a different server (ssh2_connect("11.31.138.56", 22). I am running the unix script and inside this script I am calling the .sql file . The SQL is connecting to oracle db on the unix server. But the sqlplus... (2 Replies)
Discussion started by: madfox
2 Replies

5. UNIX for Advanced & Expert Users

Call parallel sql scripts from shell and return status when both sql are done

Hi Experts: I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies

6. Shell Programming and Scripting

Execute multiple SQL scripts from single SQL Plus connection

Hi! I would like to do a single connection to sqlplus and execute some querys. Actually I do for every query one connection to database i.e echo 'select STATUS from v$instance; exit' > $SQL_FILE sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies

7. UNIX for Dummies Questions & Answers

Execute PL/SQL function from Unix script (.sql file)

Hi guys, I am new on here, I have a function in oracle that returns a specific value: create or replace PACKAGE BODY "CTC_ASDGET_SCHED" AS FUNCTION FN_ASDSCHEDULE_GET RETURN VARCHAR2 AS BEGIN DECLARE ASDSchedule varchar2(6); ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies

8. Shell Programming and Scripting

Calling SQL LDR and SQL plus scripts in a shell script

Hi- I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment... I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies

9. Shell Programming and Scripting

How to install PHP and My SQL on Solaris OS

Hi all I am really need your hand in my critical problem , I want to install PHP and My SQL on my Solaris 9 station , I am already have Apache Webserver on it . This is my system specs , I think it means some thing for who will help me : SunOS STATION_NAME 5.9 Generic_112233-08 sun4u sparc... (6 Replies)
Discussion started by: KSA
6 Replies
Login or Register to Ask a Question