[PHP-DB] Re: Don't know why query works this way

2003-08-24 Thread Jon Drukman
Aaron Wolski wrote: Here's some functions I use in my development which save on connect and query calls for me. aaron: i do more or less the same thing. allow me to criticize your functions in one very important respect: you do not check the return value of your calls! i would suggest that an

[PHP-DB] Re: Don't know why query works this way

2003-08-14 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I have been writing my queries like this... > > $link = mysql_connect ($host, $username, $password); > $query = "insert into $table ('joe', 15)"; > if ( mysql_db_query($dbname, $query, $link)) { } > > But then I was r

[PHP-DB] Re: Don't know why query works this way

2003-08-06 Thread Craig Roberts
Michael, You can select the Database to run the queries on by using mysql_select_db($dbname) after you have connected. for example: $link = mysql_connect($host, $username, $password); mysql_select_db($dbname, $link); $query = "INSERT INTO $table ('joe', 15)"; if(mysql_query($query, $link)) {