Yeah i meant recordset when i said DB, anyway the connection was lost somewhere and i couldnt find where so i ended up just creating a new connection inside the function. that works fine.
thanks for your help
Justin
User Profile
Collapse
-
which is unusual.
The DB isn't empty and I can echo the data from the DB just outside of the function brackets.
is there any way around the error?Leave a comment:
-
Recordset inside a function
Hi I have a function that is called when a user submits the signup form.
Its supposed to check with the users in the DB whether the user name exists and then return true or false...
i keep getting this error...
Warning: mysql_num_rows( ): supplied argument is not a valid MySQL result resource in /home/www/domainname/signup.php on line 22
$rsUsers is the record set
$sValue is the username im comparing... -
Im using Dreamweaver MX 2004 so im not sure what version of PHP that is but that function isn't supported......Leave a comment:
-
Also here is how my tables look in the SQL DB
Database
-Affiliates (table)
--refid
--email
--name
--surename
--etc..
-Sales (table)
--refid
--payment
--type
--etc...Leave a comment:
-
Export Table to .csv (tab delimited)
Hi, i was wondering if anyone could help me export a table that i have created to a tab delimited csv file...
Code example of my Query and print:
[PHP]mysql_connect($ server, $db_user, $db_pass)
or die ("Database CONNECT Error");
$result = mysql_db_query( $database, "SELECT sum(payment) as payments, email, sales.refid FROM sales,affiliate s WHERE sales.refid=aff iliates.refid group... -
There is alot more information than just those values and it would require me to rewrite alot of the website to have the email field in the Sales table.
I was just hopeing that there was some code that i could use instead to retrieve them both....Leave a comment:
-
PHP MySQL Query
Hi i was wondering if anyone could help me to get information from 2 different tables in my database...
Associates (table)
-ID
-email
Sales (table)
-ID
-payment
What I need to do is have the above information displayed in a table like the one below. both ID's in the tables sales and associates are identical.
...Code:[B][U]Email | Payments | ID |[/U][/B]
No activity results to display
Show More
Leave a comment: